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.
2010-03-23 Corinna Vinschen <corinna@vinschen.de>
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)
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);