bireader 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.cjs +1 -3
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/index.d.cts.map +1 -1
- package/lib/esm/index.d.mts.map +1 -1
- package/lib/esm/index.mjs +1 -3
- package/lib/esm/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -738,7 +738,7 @@ function fNumber(_this, targetNumber, bits, unsigned, endian) {
|
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
if (value === targetNumber) {
|
|
741
|
-
return z; // Found the byte, return the index
|
|
741
|
+
return z - _this.offset; // Found the byte, return the index from current
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
return -1; // number not found
|
|
@@ -1255,7 +1255,6 @@ function rint64(_this, unsigned, endian) {
|
|
|
1255
1255
|
if ((endian == undefined ? _this.endian : endian) == "little") {
|
|
1256
1256
|
for (let i = 0; i < 8; i++) {
|
|
1257
1257
|
value = value | BigInt(_this.data[_this.offset]) << BigInt(8 * i);
|
|
1258
|
-
_this.offset += 1;
|
|
1259
1258
|
}
|
|
1260
1259
|
if (unsigned == undefined || unsigned == false) {
|
|
1261
1260
|
if (value & (BigInt(1) << BigInt(63))) {
|
|
@@ -1266,7 +1265,6 @@ function rint64(_this, unsigned, endian) {
|
|
|
1266
1265
|
else {
|
|
1267
1266
|
for (let i = 0; i < 8; i++) {
|
|
1268
1267
|
value = (value << BigInt(8)) | BigInt(_this.data[_this.offset]);
|
|
1269
|
-
_this.offset += 1;
|
|
1270
1268
|
}
|
|
1271
1269
|
if (unsigned == undefined || unsigned == false) {
|
|
1272
1270
|
if (value & (BigInt(1) << BigInt(63))) {
|