]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdline.cpp
compilation fix for wxULongLongWx::Divide (Vadim, is this correct?)
[wxWidgets.git] / src / common / cmdline.cpp
index 142cf53dadd93cc920352dd480bcbc1e660d8265..efb4a3e9664c50ead898e5fdd547c3093c6c659d 100644 (file)
@@ -1015,7 +1015,7 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p)
 
                 case _T(' '):
                 case _T('\t'):
-                    if ( isInsideQuotes )
+                    if ( isInsideQuotes || isQuotedByBS )
                     {
                         // preserve it, skip endParam below
                         break;
@@ -1025,6 +1025,15 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p)
                 case _T('\0'):
                     endParam = TRUE;
                     break;
+
+                default:
+                    if ( isQuotedByBS )
+                    {
+                        // ignore backslash before an ordinary character - this
+                        // is needed to properly handle the file names under
+                        // Windows appearing in the command line
+                        arg += _T('\\');
+                    }
             }
 
             // end of argument?