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.new_mapgen_api
parent
a3e01e6dbe
commit
66bb209ad1
|
@ -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