summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 33233364e6..13c45005df 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -366,6 +366,11 @@ NtInitialize(int *argc, char ***argv)
int ret;
//
+ // subvert cmd.exe's feeble attempt at command line parsing
+ //
+ *argc = rb_w32_cmdvector(GetCommandLine(), argv);
+
+ //
// Now set up the correct time stuff
//
@@ -373,6 +378,11 @@ NtInitialize(int *argc, char ***argv)
// Initialize Winsock
StartSockets();
+
+#ifdef _WIN32_WCE
+ // free commandline buffer
+ wce_FreeCommandLine();
+#endif
}
char *getlogin()