~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/ylocale.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2009-01-26 00:18:14 UTC
  • mfrom: (1.3.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090126001814-ea5ceoy4uroruz72
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
         i < sizeof(codesetItems)/sizeof(int) - 1
58
58
         && NULL != (codeset = nl_langinfo(codesetItems[i]))
59
59
         && '\0' == *codeset;
60
 
         ++i);
 
60
         ++i) {}
61
61
 
62
62
    if (NULL == codeset || '\0' == *codeset) {
63
63
        warn(_("Failed to determinate the current locale's codeset. "
174
174
    const char *s1 = getLocaleName();
175
175
    const char *s2 = localeStr;
176
176
 
177
 
    while (*s1 && *s1++ == *s2++);
178
 
    if (*s1) while (--s2 > localeStr && !strchr("_@.", *s2));
 
177
    while (*s1 && *s1++ == *s2++) {}
 
178
    if (*s1) while (--s2 > localeStr && !strchr("_@.", *s2)) {}
179
179
 
180
180
    return s2 - localeStr;
181
181
}