* stuffextract: fixed crash with invalid locale autodetection
This commit is contained in:
parent
192eda63da
commit
f4829928e8
@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
|||||||
memcpy(loc,input,4); loc[4]=0;
|
memcpy(loc,input,4); loc[4]=0;
|
||||||
SetLocale(loc);
|
SetLocale(loc);
|
||||||
}
|
}
|
||||||
if(FileExists(std::string("Data/")+GetLocale()+"/locale-"+GetLocale()+".MPQ"))
|
if(GetLocale() && FileExists(std::string("Data/")+GetLocale()+"/locale-"+GetLocale()+".MPQ"))
|
||||||
{
|
{
|
||||||
printf("Locale \"%s\" seems valid, starting conversion...\n",GetLocale());
|
printf("Locale \"%s\" seems valid, starting conversion...\n",GetLocale());
|
||||||
CreateDir("stuffextract");
|
CreateDir("stuffextract");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user