forked from VoxeLibre/VoxeLibre
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
1048b3a38f
commit
84fa3db68a
|
@ -84,7 +84,7 @@ function image:encode()
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:save(filename)
|
function image:save(filename)
|
||||||
local f = assert(io.open(filename, "w"))
|
local f = assert(io.open(filename, "wb"))
|
||||||
f:write(self.data)
|
f:write(self.data)
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue