blfdkgg. I'm a derp.

fix potential buffer overflow.
This commit is contained in:
StapleButter 2019-01-03 13:21:21 +01:00
parent b6481a28ac
commit 172c2eb229
1 changed files with 1 additions and 1 deletions

View File

@ -1654,7 +1654,7 @@ int main(int argc, char** argv)
}
if (len > 0)
{
EmuDirectory = new char[len];
EmuDirectory = new char[len+1];
strncpy(EmuDirectory, argv[0], len);
EmuDirectory[len] = '\0';
}