Skip to content
Permalink
Browse files
Strip carriage returns from lines in settingtypes.txt (#11338)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
  • Loading branch information
neoh4x0r and SmallJoker committed Jun 21, 2021
1 parent 4b9a51f commit 9d2e7fc98305c090b7c27053ceab0b34d6affed4
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 9d2e7fc

Please sign in to comment.