From 1153525be5190e0c3445eb144b5ecb997b033372 Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Tue, 24 May 2016 21:09:59 +0300 Subject: [PATCH] dev --- .../unicode-array-nodes/UnicodeArrayRotateFunctionNode.js | 3 +-- .../unicode-array-nodes/UnicodeArrayRotateFunctionNode.ts | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.js b/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.js index 7a47ee9d..965bc7cf 100644 --- a/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.js +++ b/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.js @@ -14,8 +14,7 @@ class UnicodeArrayRotateFunctionNode extends Node_1.Node { this.node = this.getNodeStructure(); } appendNode(blockScopeNode) { - let programBodyLength = blockScopeNode.body.length, randomIndex = Utils_1.Utils.getRandomInteger(1, programBodyLength); - NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex); + NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1); } getNode() { if (!this.unicodeArray.length) { diff --git a/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.ts b/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.ts index a19d4d90..1237287a 100644 --- a/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.ts +++ b/src/custom-nodes/unicode-array-nodes/UnicodeArrayRotateFunctionNode.ts @@ -8,8 +8,7 @@ import { AppendState } from "../../enums/AppendState"; import { Node } from '../Node'; import { NodeUtils } from "../../NodeUtils"; -import {Utils} from "../../Utils"; -import {Obfuscator} from "../../Obfuscator"; +import { Utils } from "../../Utils"; export class UnicodeArrayRotateFunctionNode extends Node { /** @@ -55,10 +54,7 @@ export class UnicodeArrayRotateFunctionNode extends Node { * @param blockScopeNode */ public appendNode (blockScopeNode: BlockScopeNode): void { - let programBodyLength: number = blockScopeNode.body.length, - randomIndex: number = Utils.getRandomInteger(1, programBodyLength); - - NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex); + NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1); } /**