summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-10 00:59:00 +0200
committerAraq <rumpf_a@web.de>2014-07-10 00:59:00 +0200
commit44353c585f16da7ca868d5e0e748065c415648e8 (patch)
treefaf6143caefa7b149fc95db1bdb05312f093dd87
parent47fb8d8e6dc3ff54bf207508c153cccc27e75c4a (diff)
downloadNim-44353c585f16da7ca868d5e0e748065c415648e8.tar.gz
VM: fixes 'raise'
-rw-r--r--compiler/vm.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 155617edb..66595856a 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -902,10 +902,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
       c.exceptionInstr = pc
       let (newPc, newTos) = cleanUpOnException(c, tos)
       # -1 because of the following 'inc'
-      if pc-1 < 0:
+      if newPc-1 < 0:
         bailOut(c, tos)
         return
-      pc = newPc -1
+      pc = newPc-1
       if tos != newTos:
         tos = newTos
         move(regs, tos.slots)