From: terencehill Date: Tue, 24 Dec 2019 15:00:25 +0000 (+0100) Subject: Bot config file: properly filter out empty lines X-Git-Tag: xonotic-v0.8.5~1177^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a49b223034a20618aaf70abe72e2b9b6b044d61;p=xonotic%2Fxonotic-data.pk3dir.git Bot config file: properly filter out empty lines --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 1ab7e9737..5b26820b0 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -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;