Skip to content

Commit a781248

Browse files
committed
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

builtin/game/misc.lua

Lines changed: 1 addition & 1 deletion
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)