Skip to content

Commit a781248

Browse files
committedOct 22, 2021
Fix incorrect error message in core.encode_png
1 parent 0d345dc commit a781248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎builtin/game/misc.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function core.encode_png(width, height, data, compression)
287287
local expected_byte_count = width * height * 4
288288

289289
if type(data) ~= "table" and type(data) ~= "string" then
290-
error("Incorrect type for 'height', expected table or string, got " .. type(height))
290+
error("Incorrect type for 'data', expected table or string, got " .. type(data))
291291
end
292292

293293
local data_length = type(data) == "table" and #data * 4 or string.len(data)

0 commit comments

Comments
 (0)
Please sign in to comment.