Fix incorrect error message in core.encode_png

This commit is contained in:
sfan5 2021-10-22 10:55:18 +02:00
parent 0d345dc1bd
commit a78124831f

@ -287,7 +287,7 @@ function core.encode_png(width, height, data, compression)
local expected_byte_count = width * height * 4
if type(data) ~= "table" and type(data) ~= "string" then
error("Incorrect type for 'height', expected table or string, got " .. type(height))
error("Incorrect type for 'data', expected table or string, got " .. type(data))
end
local data_length = type(data) == "table" and #data * 4 or string.len(data)