Fix build on Windows after last commit.

This commit is contained in:
Yamagi 2020-03-16 15:55:31 +01:00
parent b2f0430c9f
commit a5eb0b16da
2 changed files with 5 additions and 5 deletions

View file

@ -94,10 +94,7 @@ main(int argc, char **argv)
// We need an argument.
if (i != (argc - 1))
{
WCHAR wpath[MAX_OSPATH];
MultiByteToWideChar(CP_UTF8, 0, argv[i + 1], -1, wpath, MAX_OSPATH);
Q_strlcpy(cfgdir, wpath, sizeof(cfgdir));
Q_strlcpy(cfgdir, argv[i + 1], sizeof(cfgdir));
}
else
{

View file

@ -44,6 +44,9 @@ static HANDLE hinput, houtput;
// Game library handle
static HINSTANCE game_library;
// Config dir
char cfgdir[MAX_OSPATH] = CFGDIR;
// Buffer for the dedicated server console
static char console_text[256];
static size_t console_textlen;
@ -526,7 +529,7 @@ Sys_GetHomeDir(void)
}
}
snprintf(gdir, sizeof(gdir), "%s/%s/", profile, CFGDIR);
snprintf(gdir, sizeof(gdir), "%s/%s/", profile, cfgdir);
return gdir;
}