1
0
forked from MTSR/mapserver

Merge pull request #77 from crocsg/python-minetest

update version checking
This commit is contained in:
Thomas Rudin 2020-01-13 17:32:04 +01:00 committed by GitHub
commit 4fb8d6f7e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,10 +69,6 @@ func parseMetadata(mapblock *MapBlock, data []byte) (int, error) {
return cr.Count, nil return cr.Count, nil
} }
if version != 2 {
return 0, errors.New("Wrong metadata version: " + strconv.Itoa(int(version)))
}
offset++ offset++
count := readU16(metadata, offset) count := readU16(metadata, offset)
@ -106,7 +102,15 @@ func parseMetadata(mapblock *MapBlock, data []byte) (int, error) {
pairsMap[key] = value pairsMap[key] = value
offset++ priv := 0
if version >=2 { /* private tag doesn't exist in version=1 */
priv = readU8(metadata, offset)
offset ++
}
if priv != 0 {
// do something usefull
logrus.Info ("Private items in Inventory")
}
} }
var currentInventoryName *string var currentInventoryName *string