From f69999679e756a7aa1e1134fbc4b9cb56e2db635 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 25 Aug 2019 17:00:02 +0100 Subject: [PATCH] Add missing clone() calls to ExprUtils.not() --- .../java/dev/openrs2/deob/ast/util/ExprUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java b/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java index adc4ae83a8..74d94f46d8 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java @@ -46,17 +46,17 @@ public final class ExprUtils { switch (binary.getOperator()) { case EQUALS: - return new BinaryExpr(left, right, BinaryExpr.Operator.NOT_EQUALS); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.NOT_EQUALS); case NOT_EQUALS: - return new BinaryExpr(left, right, BinaryExpr.Operator.EQUALS); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.EQUALS); case GREATER: - return new BinaryExpr(left, right, BinaryExpr.Operator.LESS_EQUALS); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.LESS_EQUALS); case GREATER_EQUALS: - return new BinaryExpr(left, right, BinaryExpr.Operator.LESS); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.LESS); case LESS: - return new BinaryExpr(left, right, BinaryExpr.Operator.GREATER_EQUALS); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.GREATER_EQUALS); case LESS_EQUALS: - return new BinaryExpr(left, right, BinaryExpr.Operator.GREATER); + return new BinaryExpr(left.clone(), right.clone(), BinaryExpr.Operator.GREATER); case AND: return new BinaryExpr(not(left), not(right), BinaryExpr.Operator.OR); case OR: