]> git.saurik.com Git - wxWidgets.git/commitdiff
unicode compilation fix for wxBase
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 Dec 2002 19:49:48 +0000 (19:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 Dec 2002 19:49:48 +0000 (19:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index 2e4b571d1fec2b86141e9674f7f6b51c43f98f79..244490529f04fa88efe5271aef7f2501d1d1ebf5 100644 (file)
@@ -149,18 +149,16 @@ int wxEntry(int argc, char **argv)
 
 #if wxUSE_UNICODE
     wxTheApp->argv = new wxChar*[argc+1];
-    int mb_argc = 0;
-    while (mb_argc < argc)
+    for ( int mb_argc = 0; mb_argc < argc; mb_argc++ )
     {
         wxTheApp->argv[mb_argc] = wxStrdup(wxConvLocal.cMB2WX(argv[mb_argc]));
-        mb_argc++;
     }
     wxTheApp->argv[mb_argc] = (wxChar *)NULL;
 #else
     wxTheApp->argv = argv;
 #endif
 
-    wxString name = wxFileNameFromPath(argv[0]);
+    wxString name = wxFileNameFromPath(wxTheApp->argv[0]);
     wxStripExtension(name);
     wxTheApp->SetAppName(name);
 
@@ -231,4 +229,3 @@ static void DoCleanUp()
 #endif // wxUSE_LOG
 }
 
-// vi:sts=4:sw=4:et