]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot config file: properly filter out empty lines
authorterencehill <piuntn@gmail.com>
Tue, 24 Dec 2019 15:00:25 +0000 (16:00 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 24 Dec 2019 15:00:25 +0000 (16:00 +0100)
qcsrc/server/bot/default/bot.qc

index 1ab7e9737c0529d4c8b714f0e49ea5d222b3b594..5b26820b0eb9562d53d09db18ae8983a0f374a40 100644 (file)
@@ -177,6 +177,10 @@ void bot_setnameandstuff(entity this)
                                continue;
                        if(substring(readfile, 0, 1) == "#")
                                continue;
+                       // NOTE if the line is empty tokenizebyseparator(readfile, "\t")
+                       // will create 1 empty token because there's no separator (bug?)
+                       if (readfile == "")
+                               continue;
                        tokens = tokenizebyseparator(readfile, "\t");
                        if(tokens == 0)
                                continue;