Skip to content

Commit

Permalink
Fixed SDL_main.c on Windows CE with applications containing spaces in…
Browse files Browse the repository at this point in the history
… their names.
  • Loading branch information
slouken committed Oct 5, 2002
1 parent 8d204f9 commit d3bb8d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/win32/SDL_main.c
Expand Up @@ -291,7 +291,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
#ifdef _WIN32_WCE
nLen = wcslen(szCmdLine)+128+1;
bufp = (wchar_t *)alloca(nLen*2);
GetModuleFileName(NULL, bufp, 128);
wcscpy (bufp, "\"");
GetModuleFileName(NULL, bufp+1, 128-3);
wcscpy (bufp+wcslen(bufp), "\" ");
wcsncpy(bufp+wcslen(bufp), szCmdLine,nLen-wcslen(bufp));
nLen = wcslen(bufp)+1;
cmdline = (char *)alloca(nLen);
Expand Down

0 comments on commit d3bb8d3

Please sign in to comment.