Skip to content

Commit

Permalink
Fix incorrect error message in core.encode_png
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Oct 22, 2021
1 parent 0d345dc commit a781248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/game/misc.lua
Expand Up @@ -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)
Expand Down

0 comments on commit a781248

Please sign in to comment.