aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/nodedb.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index c664792..36b5dea 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -116,6 +116,8 @@ function ndb.load_callback(file)
local stid_byte = file:read(2)
local stid = bytes_to_int(stid_byte)
local stna = file:read("*l")
+ -- possibly windows fix: strip trailing \r's from line
+ stna = string.gsub(stna, "\r$", "")
--atdebug("content id:", stid, "->", stna)
ndb_nodeids[stid] = stna
end