]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check for an empty string after processing it a little, fixes a few more edge cases
authorMario <mario.mario@y7mail.com>
Fri, 30 Sep 2022 07:20:33 +0000 (17:20 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 30 Sep 2022 07:20:33 +0000 (17:20 +1000)
qcsrc/common/mapinfo.qc

index 0f3b36c3f6f2bc366e01b47e0feee3b0e49dbf1f..f102cce87ab41247ac33fbf531a7c261fda18642 100644 (file)
@@ -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)
                {