From 2a45e6be963a8a881ed820ac2a5b8b2a2b0717e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Wed, 7 Apr 1999 16:04:47 -0700
Subject: [PATCH] bugfix

Rev: src/interpreter.h:1.4
---
 src/interpreter.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/interpreter.h b/src/interpreter.h
index 591fd2caef..156f287a1b 100644
--- a/src/interpreter.h
+++ b/src/interpreter.h
@@ -983,7 +983,12 @@ static int eval_instruction(unsigned char *pc)
 
       CASE(F_RETURN_LOCAL);
       instr=GET_ARG();
-      pop_n_elems(sp-1 - (fp->locals+instr));
+      if(fp->expendible <= fp->locals+instr)
+      {
+	pop_n_elems(sp-1 - (fp->locals+instr));
+      }else{
+	push_svalue(fp->locals+instr);
+      }
       print_return_value();
       goto do_return;
 
-- 
GitLab