mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
probably fix some pretty bad issue
good one, Generic
This commit is contained in:
@ -888,9 +888,12 @@ int main(int argc, char** argv)
|
|||||||
#else
|
#else
|
||||||
const char* confdir = g_get_user_config_dir();
|
const char* confdir = g_get_user_config_dir();
|
||||||
const char* confname = "/melonDS";
|
const char* confname = "/melonDS";
|
||||||
EmuDirectory = new char[strlen(confdir) + strlen(confname) + 1];
|
int cdlen = strlen(confdir);
|
||||||
strcat(EmuDirectory, confdir);
|
int cnlen = strlen(confname);
|
||||||
strcat(EmuDirectory, confname);
|
EmuDirectory = new char[cdlen + cnlen + 1];
|
||||||
|
strncpy(&EmuDirectory[0], confdir, cdlen);
|
||||||
|
strncpy(&EmuDirectory[cdlen], confname, cnlen);
|
||||||
|
EmuDirectory[cdlen+cnlen] = '\0';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QApplication melon(argc, argv);
|
QApplication melon(argc, argv);
|
||||||
|
Reference in New Issue
Block a user