summaryrefslogtreecommitdiffstats
path: root/opennhrp-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'opennhrp-model.lua')
-rw-r--r--opennhrp-model.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/opennhrp-model.lua b/opennhrp-model.lua
index ef9c69a..78338f9 100644
--- a/opennhrp-model.lua
+++ b/opennhrp-model.lua
@@ -52,7 +52,10 @@ local function parseconfigfile(configfilecontent)
local currentinterface
local words = {}
- for word in configfilecontent:gmatch("%S+") do words[#words + 1] = word end
+ -- remove comments, and then parse word-by-word
+ for word in string.gmatch(string.gsub(configfilecontent, "#[^\n]*", ""), "%S+") do
+ words[#words + 1] = word
+ end
local i=1
while i <= table.maxn(words) do
local word = words[i]