Skip to content
Permalink
Browse files

Windows: Free the argv we allocated for console_wmain().

  • Loading branch information
icculus committed Feb 20, 2015
1 parent e974ccf commit 674eb5563807856935fdf2676e844c71cb5dab89
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/main/windows/SDL_windows_main.c
@@ -140,14 +140,19 @@ console_ansi_main(int argc, char *argv[])
int
console_wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
{
int retval = 0;
char **argv = SDL_stack_alloc(char*, argc);
int i;

for (i = 0; i < argc; ++i) {
argv[i] = WIN_StringToUTF8(wargv[i]);
}

return main_utf8(argc, argv);
retval = main_utf8(argc, argv);

SDL_stack_free(argv);

return retval;
}
#endif

0 comments on commit 674eb55

Please sign in to comment.