mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-31 15:35:21 +01:00 
			
		
		
		
	Fix incorrect error message in core.encode_png
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user