diff options
author | maxchen32 <max_chen32@foxmail.com> | 2025-07-27 14:22:20 +0800 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-08-19 22:08:34 +0200 |
commit | f06cbfee2621e832f53cd142032e37bc674b587b (patch) | |
tree | f903406db1a007230d574797e4a064ff110c1863 /advtrains/poconvert.lua | |
parent | b2601692790cc0d4ca91c8e0d525923340feaa51 (diff) | |
download | advtrains-release-2.7.0.tar.gz advtrains-release-2.7.0.tar.bz2 advtrains-release-2.7.0.zip |
Make poconvert.lua able to handle CRLF line breaks.HEADrelease-2.7.0master
I found that poconvert.lua did not work at all on Windows. After a bit of
investigation I realized that it was the CRLF line breaks, and this
modification I made allows the code to cope with both CRLF, LF and CR line
breaks.
Diffstat (limited to 'advtrains/poconvert.lua')
-rw-r--r-- | advtrains/poconvert.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/poconvert.lua b/advtrains/poconvert.lua index 74f962e..2934a13 100644 --- a/advtrains/poconvert.lua +++ b/advtrains/poconvert.lua @@ -72,7 +72,7 @@ local function readcomment_add_flags(flags, s) end local function readcomment_aux(str, pos) - local _, epos, sval = string.find(str, "^\n*#([^\n]*)", pos) + local _, epos, sval = string.find(str, "^[\r\n]*#([^\r\n]*)", pos) if not epos then return nil end |