aboutsummaryrefslogtreecommitdiff
path: root/serialize.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-05-03 21:47:53 +0200
committerorwell96 <orwell@bleipb.de>2021-05-03 21:47:53 +0200
commit07f4e83dedbf0547ec8cdb1879c9a93268d09107 (patch)
tree44993b7280121f6e11d2cc2d839d6710a428d876 /serialize.lua
parentedcc0d09178bfb64fbaa7620a7b0176d9b57b9d1 (diff)
downloadadvtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.tar.gz
advtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.tar.bz2
advtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.zip
Strip trailing \r from lines (possibly fixes windows migration)
Diffstat (limited to 'serialize.lua')
-rw-r--r--serialize.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/serialize.lua b/serialize.lua
index 4b1ebb7..f1175ef 100644
--- a/serialize.lua
+++ b/serialize.lua
@@ -117,6 +117,8 @@ function read_table(t, file)
file:close()
error("Unexpected EOF or read error!")
end
+ -- possibly windows fix: strip trailing \r's from line
+ line = string.gsub(line, "\r$", "")
if line=="E" then
-- done with this table