Serialization: strip trailing \r also in nodedb callback

master
orwell96 2021-05-07 10:19:49 +02:00
parent 81cd305aa0
commit e506086011
1 changed files with 2 additions and 0 deletions

View File

@ -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