Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwb committed Dec 23, 2024
1 parent 80a4d29 commit 8c5b5c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wrapmsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
if (got < len) {
/* Strange Microsoft nastiness - skip prefix "\\?\" if present. */
if (wcsncmp(buf, L"\\\\?\\", 4) == 0) {
printf("Skipping \\\\?\\\n");
buf += 4;
got -= 4;
}
Expand Down Expand Up @@ -72,6 +73,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
wchar_t *p = wcsstr(c, L".exe");
if (!p) exit(1);
p[-1] = '_';
printf("commandline %ls\n", c);
/* ShellExecute returns an HINSTANCE for some strange reason - the docs say
* the only valid operation is to convert it to "INT_PTR" (which seems to
* actually be an integer type. Marvellous. */
Expand Down

0 comments on commit 8c5b5c1

Please sign in to comment.