Skip to content

Commit

Permalink
Check mapdata.Tiles length explicitly instead of just nil, fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
icza committed Aug 21, 2019
1 parent 8a11c5f commit 7d00a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repparser/repparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++ {
Expand Down

0 comments on commit 7d00a07

Please sign in to comment.