1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Make "C" the default locale.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-03-24 13:25:42 +01:00
parent 53005fc01f
commit 2c2fd29585

View file

@ -36,7 +36,8 @@ extern "C" const char* sortix_setlocale(int category, const char* locale)
char* new_strings[LC_NUM_CATEGORIES];
int from = category;
int to = category;
if ( !locale ) { return current_locales[to]; }
if ( !locale )
return current_locales[to] ? current_locales[to] : "C";
if ( category == LC_ALL ) { from = 0; to = LC_NUM_CATEGORIES-1; }
for ( int i = from; i <= to; i++ )
{