mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
dev
This commit is contained in:
@@ -15,7 +15,7 @@ class SelfDefendingUnicodeNode extends Node_1.Node {
|
||||
appendNode(blockScopeNode) {
|
||||
let programBodyLength = blockScopeNode.body.length, randomIndex = 0;
|
||||
if (programBodyLength > 2) {
|
||||
randomIndex = Utils_1.Utils.getRandomInteger(programBodyLength / 2, programBodyLength);
|
||||
randomIndex = Utils_1.Utils.getRandomInteger(programBodyLength / 2, programBodyLength - 1);
|
||||
}
|
||||
NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export class SelfDefendingUnicodeNode extends Node {
|
||||
randomIndex: number = 0;
|
||||
|
||||
if (programBodyLength > 2) {
|
||||
randomIndex = Utils.getRandomInteger(programBodyLength / 2, programBodyLength);
|
||||
randomIndex = Utils.getRandomInteger(programBodyLength / 2, programBodyLength - 1);
|
||||
}
|
||||
|
||||
NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
|
||||
|
||||
Reference in New Issue
Block a user