Skip to content

Commit 5447251

Browse files
authored
Merge pull request #7 from 0x1Avram/dev
bug fix controlflow with > 9 cases
2 parents 683c653 + fb19957 commit 5447251

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Stages/stage_07_controlflowflattening.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,9 @@ class ControlFlowFlatteningBlockStatementControlFlowTransformer extends stageDeo
539539
}
540540

541541
const controlFlowOrder = this._getControlFlowOrder(memberExpressionNode);
542-
const numericallySortedCFOrder = [...controlFlowOrder].sort();
542+
const numericallySortedCFOrder = controlFlowOrder.sort(function(a, b) {
543+
return a - b;
544+
});
543545
for(let i = 0; i < numericallySortedCFOrder.length; i++){
544546
if(numericallySortedCFOrder[i] != i){
545547
return false;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-deobfuscator",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Deobfuscator for javascript samples obfuscated by obfuscator.io.",
55
"keywords": [
66
"deobfuscation",

0 commit comments

Comments
 (0)