From 7d00a0775a45c9e7469fc502747aebfc3dc5b822 Mon Sep 17 00:00:00 2001 From: Andras Belicza Date: Wed, 21 Aug 2019 14:30:03 +0200 Subject: [PATCH] Check mapdata.Tiles length explicitly instead of just nil, fixes #15 --- repparser/repparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repparser/repparser.go b/repparser/repparser.go index 0715e86..15cb987 100644 --- a/repparser/repparser.go +++ b/repparser/repparser.go @@ -616,7 +616,7 @@ func parseMapData(data []byte, r *rep.Replay) error { // The first one is the biggest (whole map size), // but the beginning of map is empty. The subsequent MTXM // sub-sections will fill the whole at the beginning. - if md.Tiles == nil { + if len(md.Tiles) == 0 { md.Tiles = make([]uint16, maxI) } for i := uint32(0); i < maxI; i++ {