From db26e75242aa8ac18fca6b13a269cf0b9fe98b58 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 18 Apr 2009 16:38:36 +0400 Subject: [PATCH] src/strutil8bit.c (str_8bit_search_first): fixed case sensitivity searching. (str_8bit_search_last): likewise. --- src/strutil8bit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strutil8bit.c b/src/strutil8bit.c index 3b54fe28b..d1d2f7f32 100644 --- a/src/strutil8bit.c +++ b/src/strutil8bit.c @@ -513,7 +513,7 @@ str_8bit_search_first (const char *text, const char *search, int case_sen) size_t offsset; fold_text = (case_sen) ? (char *) text : g_strdown (g_strdup (text)); - fold_search = (case_sen) ? (char *) text : g_strdown (g_strdup (search)); + fold_search = (case_sen) ? (char *) search : g_strdown (g_strdup (search)); match = g_strstr_len (fold_text, -1, fold_search); if (match != NULL) @@ -540,7 +540,7 @@ str_8bit_search_last (const char *text, const char *search, int case_sen) size_t offsset; fold_text = (case_sen) ? (char *) text : g_strdown (g_strdup (text)); - fold_search = (case_sen) ? (char *) text : g_strdown (g_strdup (search)); + fold_search = (case_sen) ? (char *) search : g_strdown (g_strdup (search)); match = g_strrstr_len (fold_text, -1, fold_search); if (match != NULL)