From: Rudolf Polzer Date: Sun, 26 Jan 2014 13:28:53 +0000 (+0100) Subject: Fix error handling in "gametype" keyword parsing, fixes #1884. X-Git-Tag: xonotic-v0.8.0~232 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7e9d4404fbd602050e843cb2169f8afab4163b11;p=xonotic%2Fxonotic-data.pk3dir.git Fix error handling in "gametype" keyword parsing, fixes #1884. --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 8493887ca..feb0e0364 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -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"); } }