]> git.lizzy.rs Git - minetest.git/commitdiff
Fix incorrect error message in core.encode_png
authorsfan5 <sfan5@live.de>
Fri, 22 Oct 2021 08:55:18 +0000 (10:55 +0200)
committersfan5 <sfan5@live.de>
Fri, 22 Oct 2021 08:55:18 +0000 (10:55 +0200)
builtin/game/misc.lua

index 63d64817c7579b671a1e54eddf49451486bede1c..05237662ceb3332052071c5ca0d0b3e81e894195 100644 (file)
@@ -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)