Ticket #2249: fix crash at startup

str_8bit_strdown() returned an incorrect value.
This commit is contained in:
Oswald Buddenhagen 2010-06-30 00:46:03 +02:00 committed by Andrew Borodin
parent 2e973fbbbd
commit 807ccb469c
1 changed files with 4 additions and 6 deletions

View File

@ -577,17 +577,15 @@ str_8bit_release_search_needle (char *needle, int case_sen)
static char *
str_8bit_strdown (const char *str)
{
char *rets;
char *rets, *p;
rets = g_strdup (str);
if (rets == NULL)
return NULL;
while (*rets != '\0')
{
*rets = char_tolower (*rets);
rets++;
}
for (p = rets; *p != '\0'; p++)
*p = char_tolower (*p);
return rets;
}