Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip carriage returns from lines in settingtypes.txt #11338

Merged
merged 2 commits into from Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions builtin/mainmenu/dlg_settings_advanced.lua
Expand Up @@ -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
Expand Down