* locale.cc (add_locale_alias_locales): Always use loc_num at function
start to avoid confusing bsearch.
This commit is contained in:
parent
1399e29a1f
commit
536ad25322
@ -1,3 +1,8 @@
|
||||
2010-03-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* locale.cc (add_locale_alias_locales): Always use loc_num at function
|
||||
start to avoid confusing bsearch.
|
||||
|
||||
2010-03-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* locale.cc: Revert accidental checkin of unfinished changes.
|
||||
|
@ -209,6 +209,7 @@ add_locale_alias_locales ()
|
||||
const char *alias, *replace;
|
||||
char orig_locale[32];
|
||||
loc_t search, *loc;
|
||||
size_t orig_loc_num = loc_num;
|
||||
|
||||
FILE *fp = fopen (LOCALE_ALIAS, "rt");
|
||||
if (!fp)
|
||||
@ -237,7 +238,7 @@ add_locale_alias_locales ()
|
||||
if (c)
|
||||
*c = '\0';
|
||||
search.name = replace;
|
||||
loc = (loc_t *) bsearch (&search, locale, loc_num, sizeof (loc_t),
|
||||
loc = (loc_t *) bsearch (&search, locale, orig_loc_num, sizeof (loc_t),
|
||||
compare_locales);
|
||||
add_locale (alias, loc ? loc->language : L"", loc ? loc->territory : L"",
|
||||
true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user