diff options
author | orwell96 <orwell@bleipb.de> | 2021-05-07 10:19:49 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-05-07 10:19:49 +0200 |
commit | e506086011ee24a30d3085c6933e8e38f2abd325 (patch) | |
tree | 626a1f85679f7ac1b14d04b3dfcdaf8250c7e826 /advtrains | |
parent | 81cd305aa04f7af0bd812c5addb8673d5d633b44 (diff) | |
download | advtrains-e506086011ee24a30d3085c6933e8e38f2abd325.tar.gz advtrains-e506086011ee24a30d3085c6933e8e38f2abd325.tar.bz2 advtrains-e506086011ee24a30d3085c6933e8e38f2abd325.zip |
Serialization: strip trailing \r also in nodedb callbackrelease-2.3.1
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/nodedb.lua | 2 |
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 |