w-ui-v1 1.0.57 → 1.0.58

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/nfc.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
package/utils/nfc.ts CHANGED
@@ -203,8 +203,10 @@ function __read(intent) {
203
203
  // }
204
204
  function bytesToDecimalString(inarray) {
205
205
  let result = BigInt(0);
206
- for (let j = 0; j < inarray.length; j++) {
207
- const byte = BigInt(parseInt(inarray[j])) & BigInt(0xff);
206
+ // 反转数组以适配大端序
207
+ const reversed = [...inarray].reverse();
208
+ for (let j = 0; j < reversed.length; j++) {
209
+ const byte = BigInt(parseInt(reversed[j])) & BigInt(0xff);
208
210
  result = (result << BigInt(8)) | byte;
209
211
  }
210
212
  return result.toString();