]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Skip commented out lines when scanning .arena files for map information
authorMario <mario.mario@y7mail.com>
Thu, 29 Sep 2022 08:25:56 +0000 (18:25 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 29 Sep 2022 08:25:56 +0000 (18:25 +1000)
qcsrc/common/mapinfo.qc

index 2aada5085b81bba311f1ecc9ed1ac897ba7f4f3a..508015d58caec33c3075e6cc6c168fe24e37a063 100644 (file)
@@ -953,6 +953,8 @@ string _MapInfo_FindArenaFile(string pFilename, string extension)
                        continue; // how?
                for(string s; (s = fgets(fh)); )
                {
+                       if(substring(s, 0, 2) == "//")
+                               continue;
                        int offset = strstrofs(s, "map", 0);
                        if(offset >= 0)
                        {