Skip to content

Commit

Permalink
Windows: Free the argv we allocated for console_wmain().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 20, 2015
1 parent e974ccf commit 674eb55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/windows/SDL_windows_main.c
Expand Up @@ -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

Expand Down

0 comments on commit 674eb55

Please sign in to comment.