Browse Source

fix: declare radix in parseInt

Co-authored-by: Jixun Wu <5713045+jixunmoe@users.noreply.github.com>
(cherry picked from commit eee7d7aedc37797820184c12f6954df23e4b98b8)
20230320
MengYX 3 years ago
committed by MengYX
parent
commit
af10576b88
No known key found for this signature in database GPG Key ID: E63F9C7303E8F604
  1. 2
      src/decrypt/qmc.ts

2
src/decrypt/qmc.ts

@ -145,7 +145,7 @@ export class QmcDecoder {
if (keyEnd < 0) { if (keyEnd < 0) {
throw new Error('invalid key: search song id failed'); throw new Error('invalid key: search song id failed');
} }
this._songID = parseInt(textEnc.decode(idBuf.subarray(0, idEnd))); this._songID = parseInt(textEnc.decode(idBuf.subarray(0, idEnd)), 10);
} else { } else {
const sizeView = new DataView(last4Byte.buffer, last4Byte.byteOffset); const sizeView = new DataView(last4Byte.buffer, last4Byte.byteOffset);
const keySize = sizeView.getUint32(0, true); const keySize = sizeView.getUint32(0, true);

Loading…
Cancel
Save