From 1c8d1099172af5af4f76139243460ebdb9ae27ea Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 11 Mar 1999 22:55:04 +0000 Subject: [PATCH] only add variables to used, that aren't already there git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@379 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/flow/VariableStack.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jode/jode/flow/VariableStack.java b/jode/jode/flow/VariableStack.java index bc63a27..cfa4ee3 100644 --- a/jode/jode/flow/VariableStack.java +++ b/jode/jode/flow/VariableStack.java @@ -88,7 +88,8 @@ public class VariableStack { } Expression[] loads = new Expression[stackMap.length]; for (int i=0; i< stackMap.length; i++) { - used.addElement(stackMap[i]); + if (!used.contains(stackMap[i])) + used.addElement(stackMap[i]); loads[i] = new LocalLoadOperator(stackMap[i].getType(), stackMap[i]); }