From 9d2e7fc98305c090b7c27053ceab0b34d6affed4 Mon Sep 17 00:00:00 2001 From: "William L. DeRieux IV" Date: Mon, 21 Jun 2021 13:55:48 -0400 Subject: Strip carriage returns from lines in settingtypes.txt (#11338) Co-authored-by: SmallJoker --- builtin/mainmenu/dlg_settings_advanced.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builtin/mainmenu/dlg_settings_advanced.lua') diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 1452559fa..06fd32d84 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -31,6 +31,10 @@ end -- returns error message, or nil local function parse_setting_line(settings, line, read_all, base_level, allow_secure) + + -- strip carriage returns (CR, /r) + line = line:gsub("\r", "") + -- comment local comment = line:match("^#" .. CHAR_CLASSES.SPACE .. "*(.*)$") if comment then -- cgit v1.2.3