Skip to content

Commit 72e0eeb

Browse files
committed
Fix range error when raw data length is too short
1 parent 707411b commit 72e0eeb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/services/struct_schemas/nt_struct.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ class NTStruct {
508508
Map<String, Object?> values = {};
509509

510510
for (final field in schema.fields) {
511+
if (field.bitRange.$2 > dataBitArray.length) break;
511512
if (field.isArray) {
512513
List<Object?> value = [];
513514

0 commit comments

Comments
 (0)