From e542d1a36d6c5883ab0afbfc82f342588faf1615 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 29 Oct 2018 20:18:50 -0400 Subject: [PATCH] winmain: Patched to compile on C89 compilers. --- src/main/windows/SDL_windows_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/windows/SDL_windows_main.c b/src/main/windows/SDL_windows_main.c index 039503224..32f672760 100644 --- a/src/main/windows/SDL_windows_main.c +++ b/src/main/windows/SDL_windows_main.c @@ -145,8 +145,9 @@ main_getcmdline() cmdalloc = rc + (sizeof (char *) * argc_guess); argv = (char **) VirtualAlloc(NULL, cmdalloc, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); if (argv) { + int rc2; 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); } }