Better error when dealing with newline corruption (#492)

* Improve error for corrupt newlines

* A bit better
This commit is contained in:
thegrb93 2024-12-06 14:39:50 -05:00 committed by GitHub
parent 883dd6389c
commit 722c560515
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,6 +389,8 @@ local function getInfo(str)
if info.check ~= "\r\n\t\n" then
if info.check == "\10\9\10" then
error("Detected AD2 file corrupted in file transfer (newlines homogenized)(when using FTP, transfer AD2 files in image/binary mode, not ASCII/text mode)!")
elseif info.check ~= nil then
error("Detected AD2 file corrupted by newline replacements (copy/pasting the data in various editors can cause this!)")
else
error("Attempt to read AD2 file with malformed info block!")
end