From 633ef83fa12ba77ce55d97477c160cb15359c179 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 10 Jun 2008 18:48:46 -0600 Subject: [PATCH] fix handling of values which appear more than once on the stack in trySteal --- src/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 99b647c2bb..64ced76ac2 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1008,7 +1008,7 @@ trySteal(Context* c, Register* r, Stack* stack) unsigned count = 0; Stack* start = 0; for (Stack* s = stack; s and (not s->pushed); s = s->next) { - if (s->value == v) { + if (start == 0 and s->value == v) { start = s; } if (start) {