Skip to content

Commit

Permalink
CRLF fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Steamo committed Feb 26, 2024
1 parent c5c0055 commit 409c1da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loader/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ function loadMods(modsDirectory)
elseif filename:match("%.lua$") then -- Check if the file is a .lua file
local fileContent = love.filesystem.read(filePath)

-- Convert CRLF in LF
fileContent = fileContent:gsub("\r\n", "\n")

-- Check the header lines using string.match
local headerLine, secondaryLine = fileContent:match("^(.-)\n(.-)\n")
if headerLine == "--- STEAMODDED HEADER" and secondaryLine == "--- SECONDARY MOD FILE" then
Expand Down

0 comments on commit 409c1da

Please sign in to comment.