fix: declare radix in parseInt

Co-authored-by: Jixun Wu <5713045+jixunmoe@users.noreply.github.com>
This commit is contained in:
MengYX
2021-12-25 20:20:15 +08:00
committed by GitHub
parent 700574fb8e
commit eee7d7aedc

View File

@@ -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);