diff --git a/lib/src/types/decimal_128.dart b/lib/src/types/decimal_128.dart index ca5f074..e9c805c 100644 --- a/lib/src/types/decimal_128.dart +++ b/lib/src/types/decimal_128.dart @@ -105,6 +105,9 @@ class BsonDecimal128 extends BsonObject { int byteLength() => 16; unpackValue(BsonBinary buffer) { + if (bin.byteList == null) { + bin.makeByteList(); + } bin.byteList.setRange(0, 16, buffer.byteList, buffer.offset); buffer.offset += 16; }