mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove statement semicolons from a lua script
This commit is contained in:
parent
1ab29f1716
commit
eefa39e47b
1 changed files with 3 additions and 3 deletions
|
@ -303,13 +303,13 @@ function core.encode_png(width, height, data, compression)
|
||||||
error("Incorrect type for 'height', expected number, got " .. type(height))
|
error("Incorrect type for 'height', expected number, got " .. type(height))
|
||||||
end
|
end
|
||||||
|
|
||||||
local expected_byte_count = width * height * 4;
|
local expected_byte_count = width * height * 4
|
||||||
|
|
||||||
if type(data) ~= "table" and type(data) ~= "string" then
|
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 'height', expected table or string, got " .. type(height))
|
||||||
end
|
end
|
||||||
|
|
||||||
local data_length = type(data) == "table" and #data * 4 or string.len(data);
|
local data_length = type(data) == "table" and #data * 4 or string.len(data)
|
||||||
|
|
||||||
if data_length ~= expected_byte_count then
|
if data_length ~= expected_byte_count then
|
||||||
error(string.format(
|
error(string.format(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue