diff options
author | orwell96 <orwell@bleipb.de> | 2021-05-03 21:47:53 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-05-03 21:47:53 +0200 |
commit | 07f4e83dedbf0547ec8cdb1879c9a93268d09107 (patch) | |
tree | 44993b7280121f6e11d2cc2d839d6710a428d876 | |
parent | edcc0d09178bfb64fbaa7620a7b0176d9b57b9d1 (diff) | |
download | advtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.tar.gz advtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.tar.bz2 advtrains-07f4e83dedbf0547ec8cdb1879c9a93268d09107.zip |
Strip trailing \r from lines (possibly fixes windows migration)
-rw-r--r-- | serialize.lua | 2 |
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 |