aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authorimcasper <casper2756@gmail.com>2018-06-05 03:21:23 +0300
committerorwell96 <orwell@bleipb.de>2018-06-14 17:39:42 +0200
commit105aacccf9304a4eddb4bee81eb9c64b63aae9f4 (patch)
tree31787e4fad75905b27fae77fb0b58b2ac8c74782 /advtrains
parent3d7924c751bc8ca438e4b9bd1cb1f241cc636494 (diff)
downloadadvtrains-105aacccf9304a4eddb4bee81eb9c64b63aae9f4.tar.gz
advtrains-105aacccf9304a4eddb4bee81eb9c64b63aae9f4.tar.bz2
advtrains-105aacccf9304a4eddb4bee81eb9c64b63aae9f4.zip
Update nodedb.lua
correct read/write file binary data
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/nodedb.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index 6695eba..7433042 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -57,7 +57,7 @@ local path=minetest.get_worldpath()..DIR_DELIM.."advtrains_ndb2"
--nodeids get loaded by advtrains init.lua and passed here
function ndb.load_data(data)
ndb_nodeids = data and data.nodeids or {}
- local file, err = io.open(path, "r")
+ local file, err = io.open(path, "rb")
if not file then
atwarn("Couldn't load the node database: ", err or "Unknown Error")
else
@@ -81,7 +81,7 @@ end
--save
function ndb.save_data()
- local file, err = io.open(path, "w")
+ local file, err = io.open(path, "wb")
if not file then
atwarn("Couldn't save the node database: ", err or "Unknown Error")
else