diff options
author | William L. DeRieux IV <williamderieux@gmail.com> | 2021-06-21 13:55:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 18:55:48 +0100 |
commit | 9d2e7fc98305c090b7c27053ceab0b34d6affed4 (patch) | |
tree | 873f3b0a888443d748efeb52316b083e79d9f957 /builtin | |
parent | 4b9a51ff0d9d546916f09197b64b5da295027d35 (diff) | |
download | minetest-9d2e7fc98305c090b7c27053ceab0b34d6affed4.tar.gz minetest-9d2e7fc98305c090b7c27053ceab0b34d6affed4.tar.bz2 minetest-9d2e7fc98305c090b7c27053ceab0b34d6affed4.zip |
Strip carriage returns from lines in settingtypes.txt (#11338)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/dlg_settings_advanced.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |