Fix file opening mode on the Lua side, to avoid crashes on Windows

This commit is contained in:
Gael-de-Sailly
2020-11-14 17:31:36 +01:00
parent b90cecdaf7
commit 6b9c091dd5
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
local worldpath = minetest.get_worldpath() .. "/river_data/"
local function load_map(filename, bytes, signed, size)
local file = io.open(worldpath .. filename, 'r')
local file = io.open(worldpath .. filename, 'rb')
local data = file:read('*all')
if #data < bytes*size then
data = minetest.decompress(data)