From f99e885d9fe8684423a703590120b45004b252b9 Mon Sep 17 00:00:00 2001 From: MengYX Date: Tue, 11 Feb 2020 16:23:50 +0800 Subject: [PATCH] Fix Mgg Mask Detect Bug --- src/decrypt/qmcMask.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decrypt/qmcMask.js b/src/decrypt/qmcMask.js index 7403fc1..e66a104 100644 --- a/src/decrypt/qmcMask.js +++ b/src/decrypt/qmcMask.js @@ -158,14 +158,14 @@ export function QmcMaskCreate58(matrix, superA, superB) { */ function getMaskConfidenceResult(confidence) { if (confidence.length === 0) throw "can not match at least one key"; - let result = 0, conf = 0; + let result, conf = 0; for (let idx in confidence) { if (confidence[idx] > conf) { result = idx; conf = confidence[idx]; } } - return result + return parseInt(result) } /**