From e6ea08021ef5a0c205955d5d07cddc785f4ffaed Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Tue, 7 Aug 2018 20:09:30 -0400 Subject: [PATCH] Always interpret long_array as 64-bit previously, some arrays could (by chance) be interpreted as smaller integers --- overviewer_core/world.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 26e351b..d13b181 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -587,7 +587,7 @@ class RegionSet(object): bits_per_value = (len(long_array) * 64) / n if bits_per_value < 4 or 12 < bits_per_value: raise nbt.CorruptChunkError() - b = numpy.frombuffer(numpy.asarray(long_array), dtype=numpy.uint8) + b = numpy.frombuffer(numpy.asarray(long_array, dtype=numpy.uint64), dtype=numpy.uint8) if bits_per_value == 8: result = b.astype(numpy.uint16) else: