fix: miscellaneous bugs + crashes (#52)
Reviewed-on: https://git.neolegacy.dev/neoStudiosLCE/neoLegacy/pulls/52
This commit is contained in:
@@ -81,8 +81,12 @@ const char *wstringtofilename(const wstring& name)
|
||||
#else
|
||||
if(c=='/') c='\\';
|
||||
#endif
|
||||
assert(c<128); // Will we have to do any conversion of non-ASCII characters in filenames?
|
||||
buf[i] = static_cast<char>(c);
|
||||
// assert(c<128); // Will we have to do any conversion of non-ASCII characters in filenames?
|
||||
if (c >= 128) {
|
||||
printf("Non-ASCII character in filename: %lc\n", c);
|
||||
c = '?';
|
||||
}
|
||||
// buf[i] = static_cast<char>(c); does nothing
|
||||
buf.push_back(static_cast<char>(c));
|
||||
}
|
||||
return buf.c_str();
|
||||
|
||||
Reference in New Issue
Block a user