From: Mart Raudsepp Date: Wed, 14 Oct 1998 06:45:08 +0000 (+0000) Subject: error in func ConvertToStandardCommandArgs with argv[] X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0ed9fce61aea8209a03b493a781592286ed3cbd9 error in func ConvertToStandardCommandArgs with argv[] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/app.cpp b/src/msw/app.cpp index b3a40f84c3..22ced1c679 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -348,17 +348,20 @@ bool wxApp::RegisterWindowClasses() void wxApp::ConvertToStandardCommandArgs(char* lpCmdLine) { // Split command line into tokens, as in usual main(argc, argv) - char **command = new char*[50]; // VZ: sure? why not 25 or 73 and a half?? - - int count = 0; + int para,count = 0; char *buf = new char[strlen(lpCmdLine) + 1]; + para=0; /* Model independent strcpy */ - int i; - for (i = 0; (buf[i] = lpCmdLine[i]) != 0; i++) + unsigned int i; + for (i = 0; iargc = count; for (i = 0; i < count; i++) - { wxTheApp->argv[i] = copystring(command[i]); - delete [] command[i]; - } +#if !defined(__GNUWIN32__) +// use copystring than delete this pointer + delete [] command[0]; +#endif delete [] command; delete [] buf;