From e48bc48aab56a5f2f7a9ccb175673dfef162bd45 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Wed, 7 Apr 2021 19:13:34 +0200 Subject: [PATCH] d2ds1: fixed bug, when (if version was >= v16), the file was encoded incorrectly --- d2common/d2fileformats/d2ds1/ds1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2common/d2fileformats/d2ds1/ds1.go b/d2common/d2fileformats/d2ds1/ds1.go index 5d809c9e..f35ff27c 100644 --- a/d2common/d2fileformats/d2ds1/ds1.go +++ b/d2common/d2fileformats/d2ds1/ds1.go @@ -572,7 +572,7 @@ func (ds1 *DS1) Marshal() []byte { sw.PushInt32(int32(len(ds1.Walls))) if ds1.version.specifiesFloors() { - sw.PushInt32(int32(len(ds1.Walls))) + sw.PushInt32(int32(len(ds1.Floors))) } }