mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
auto.lua: fix consistency on Windows
This commit is contained in:
@@ -77,13 +77,14 @@ local function auto(name)
|
||||
local out_data = ""
|
||||
--go through the input file line-by-line
|
||||
for line in src_file:lines() do
|
||||
line = line:gsub("\r", "")
|
||||
--if the line is non-empty
|
||||
if #line > 0 then
|
||||
--set the counter to -1
|
||||
--this will start a new line (see tohex)
|
||||
counter = -1
|
||||
--append the output to what we had, plus a newline character (0x0a is newline)
|
||||
out_data = ("%s%s0x0a,"):format(out_data, line:gsub("\r", ""):gsub(".", tohex))
|
||||
out_data = ("%s%s0x0a,"):format(out_data, line:gsub(".", tohex))
|
||||
else
|
||||
out_data = out_data .. "\n\t0x0a,"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user