- fixed progdir setup.

This commit is contained in:
Christoph Oelckers 2019-10-19 19:22:23 +02:00
parent d4fc13fba5
commit 39e32d560c
2 changed files with 3 additions and 1 deletions

View file

@ -131,6 +131,7 @@ int32_t win_buildargs(char **argvbuf)
// Figure out what directory the program resides in.
progdir = argvbuf[0];
progdir.Substitute("\\", "/");
auto lastsep = progdir.LastIndexOf('/');
if (lastsep != -1)
progdir.Truncate(lastsep + 1);