From: Mario Date: Fri, 30 Sep 2022 07:20:33 +0000 (+1000) Subject: Check for an empty string after processing it a little, fixes a few more edge cases X-Git-Tag: xonotic-v0.8.6~328^2~7 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=463dbca6f75358ec36d27f493741c1381c52a444;p=xonotic%2Fxonotic-data.pk3dir.git Check for an empty string after processing it a little, fixes a few more edge cases --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 0f3b36c3f..f102cce87 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -943,12 +943,12 @@ string _MapInfo_CheckArenaFile(string pFilename, string pMapname) for(string s; (s = fgets(fh)); ) { s = strreplace("\t", "", s); - if(s == "") - continue; while(substring(s, 0, 1) == " ") s = substring(s, 1, -1); if(substring(s, 0, 2) == "//") continue; + if(s == "") + continue; int offset = strstrofs(s, "map", 0); if(offset >= 0) {