bireader 1.0.52 → 1.0.53
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 +3 -1
- 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 +3 -1
- package/lib/esm/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -1232,7 +1232,9 @@ function wfloat(_this, value, endian) {
|
|
|
1232
1232
|
_this.errorDump ? "[Error], hexdump:\n" + _this.hexdump() : "";
|
|
1233
1233
|
throw new Error('Value is out of range for the specified float length.' + " min: " + minValue + " max: " + maxValue + " value: " + value);
|
|
1234
1234
|
}
|
|
1235
|
-
|
|
1235
|
+
const dataView = new DataView(new Uint8Array(4).buffer);
|
|
1236
|
+
dataView.setFloat32(0, value, true);
|
|
1237
|
+
let intValue = dataView.getInt32(0, true);
|
|
1236
1238
|
let shift = 0;
|
|
1237
1239
|
for (let i = 0; i < 4; i++) {
|
|
1238
1240
|
if ((endian = undefined ? endian : _this.endian) == "little") {
|