1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Did not compare the stack correctly.

This commit is contained in:
Alain Magloire 2003-01-27 18:46:17 +00:00
parent 2e0af82c97
commit c639d037ed

View file

@ -78,14 +78,15 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
Variable[] vars = getVariables();
for (int i = 0; i < vars.length; i++) {
if (vars[i].getName().equals(name)) {
if (stack != null && vars[i].getStackFrame().equals(stack)) {
ICDIStackFrame frame = vars[i].getStackFrame();
if (stack == null && frame == null) {
return vars[i];
} else if (frame != null && stack != null && frame.equals(stack)) {
if (vars[i].getVariableObject().getPosition() == position) {
if (vars[i].getVariableObject().getStackDepth() == depth) {
return vars[i];
}
}
} else {
return vars[i];
}
}
}