Read PNGs using "rb" instead of just "r"
This commit is contained in:
parent
134db0ce3f
commit
2d567e2ef5
@ -205,7 +205,7 @@ function def:_set_texture(texture, reset)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
self._paintable_pixels = {}
|
self._paintable_pixels = {}
|
||||||
local file = io.open(assert(media_paths[self._.base_texture], self._.base_texture), "r")
|
local file = io.open(assert(media_paths[self._.base_texture], self._.base_texture), "rb")
|
||||||
local png = modlib.minetest.decode_png(file)
|
local png = modlib.minetest.decode_png(file)
|
||||||
assert(not file:read(1), "EOF expected")
|
assert(not file:read(1), "EOF expected")
|
||||||
file:close()
|
file:close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user