Skip to content

Commit

Permalink
fix readLong on Web
Browse files Browse the repository at this point in the history
  • Loading branch information
hasToDev committed Aug 15, 2023
1 parent f5ee218 commit 539999b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/xdr/xdr_data_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ class DataInput {
_offset = _offset! + 8;

if (kIsWeb) {
BigInt bigInt = decodeBigInt(view!.buffer.asUint8List(oldOffset!));
List<int> buffer = view!.buffer.asUint8List(oldOffset!);
if (buffer.length > 8) buffer = buffer.sublist(0, 8);
BigInt bigInt = decodeBigInt(buffer);
return bigInt.toInt();
} else {
return view!.getInt64(oldOffset!, endian);
Expand Down

0 comments on commit 539999b

Please sign in to comment.