]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix error handling in "gametype" keyword parsing, fixes #1884.
authorRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jan 2014 13:28:53 +0000 (14:28 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jan 2014 13:28:53 +0000 (14:28 +0100)
qcsrc/common/mapinfo.qc

index 8493887cae715ca1413e51cdd94cc087ec694d2f..feb0e036420e49d47ce211390463ed8ccd951b9f 100644 (file)
@@ -602,14 +602,11 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
                p = strstrofs(sa, "=", 0);
                if(p < 0)
                {
-                       k = "timelimit";
-                       v = s;
-               }
-               else
-               {
-                       k = substring(sa, 0, p);
-                       v = substring(sa, p+1, -1);
+                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
+                       continue;
                }
+               k = substring(sa, 0, p);
+               v = substring(sa, p+1, -1);
 
                if(k == "timelimit")
                {
@@ -645,7 +642,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
                }
                else
                {
-                       print("Invalid gametype key in mapinfo: ", k, "\n");
+                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
                }
        }