forked from Mirrorlandia_minetest/minetest
Strip carriage returns from lines in settingtypes.txt (#11338)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
4b9a51ff0d
commit
9d2e7fc983
@ -31,6 +31,10 @@ end
|
|||||||
|
|
||||||
-- returns error message, or nil
|
-- returns error message, or nil
|
||||||
local function parse_setting_line(settings, line, read_all, base_level, allow_secure)
|
local function parse_setting_line(settings, line, read_all, base_level, allow_secure)
|
||||||
|
|
||||||
|
-- strip carriage returns (CR, /r)
|
||||||
|
line = line:gsub("\r", "")
|
||||||
|
|
||||||
-- comment
|
-- comment
|
||||||
local comment = line:match("^#" .. CHAR_CLASSES.SPACE .. "*(.*)$")
|
local comment = line:match("^#" .. CHAR_CLASSES.SPACE .. "*(.*)$")
|
||||||
if comment then
|
if comment then
|
||||||
|
Loading…
Reference in New Issue
Block a user