mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-20 09:53:46 +01:00
Fix TGA file writing on Windows
Before this patch, the tga_encoder mod would write corrupted TGA files on Windows: Bytes that looked like newlines were replaced by a carriage return and a newline.
This commit is contained in:
parent
3f60b5baa6
commit
adb8e45d67
2
init.lua
2
init.lua
@ -84,7 +84,7 @@ function image:encode()
|
||||
end
|
||||
|
||||
function image:save(filename)
|
||||
local f = assert(io.open(filename, "w"))
|
||||
local f = assert(io.open(filename, "wb"))
|
||||
f:write(self.data)
|
||||
f:close()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user