Skip to content

Commit

Permalink
Merge pull request #72 from hasToDev/fix-readlong
Browse files Browse the repository at this point in the history
fix readLong on Web
  • Loading branch information
christian-rogobete authored Aug 16, 2023
2 parents 23c44f0 + 539999b commit 9a3c06e
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 9a3c06e

Please sign in to comment.