From f06cbfee2621e832f53cd142032e37bc674b587b Mon Sep 17 00:00:00 2001 From: maxchen32 Date: Sun, 27 Jul 2025 14:22:20 +0800 Subject: Make poconvert.lua able to handle CRLF line breaks. 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. --- advtrains/poconvert.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3