From a78124831f71a235756ca2321a6422295d67572f Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 22 Oct 2021 10:55:18 +0200 Subject: [PATCH] Fix incorrect error message in core.encode_png --- builtin/game/misc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 63d64817c..05237662c 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -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)