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
1 changed files with 2 additions and 1 deletions

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++ )
{