winmain: Patched to compile on C89 compilers.

Ryan C. Gordon 2018-10-29 20:18:50 -04:00
parent f434a98c26
commit e542d1a36d
1 changed files with 2 additions and 1 deletions

View File

@ -145,8 +145,9 @@ main_getcmdline()
cmdalloc = rc + (sizeof (char *) * argc_guess); cmdalloc = rc + (sizeof (char *) * argc_guess);
argv = (char **) VirtualAlloc(NULL, cmdalloc, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); argv = (char **) VirtualAlloc(NULL, cmdalloc, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
if (argv) { if (argv) {
int rc2;
cmdline = (char *) (argv + argc_guess); cmdline = (char *) (argv + argc_guess);
const int rc2 = WideCharToMultiByte(CP_UTF8, 0, text, -1, cmdline, rc, NULL, NULL); rc2 = WideCharToMultiByte(CP_UTF8, 0, text, -1, cmdline, rc, NULL, NULL);
SDL_assert(rc2 == rc); SDL_assert(rc2 == rc);
} }
} }