QTfrontend/main.cpp
changeset 2035 70734c4f52a7
parent 2034 decdf48cffd7
child 2072 6e0fcbcc3f60
--- a/QTfrontend/main.cpp	Fri May 08 01:49:11 2009 +0000
+++ b/QTfrontend/main.cpp	Fri May 08 01:56:20 2009 +0000
@@ -50,13 +50,15 @@
     QMap<QString, QString> parsedArgs;
     {
         QList<QString>::iterator i = arguments.begin();
-        while(++i != arguments.end()) {
+        while(i != arguments.end()) {
             QString arg = *i;
 
             QRegExp opt("--(\\S+)=(.+)");
             if(opt.exactMatch(arg)) {
                 parsedArgs[opt.cap(1)] = opt.cap(2);
-                arguments.erase(i);
+                i = arguments.erase(i);
+            } else {
+              ++i;
             }
         }
     }