From eb6f0cbb79ffa74d72961a11ae0aaba047beef43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 9 Jan 2011 00:28:49 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Raise an error instead of crashing now when reading memory at a forbidden address with a @() function. git-svn-id: svn://localhost/gambas/trunk@3451 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_subr_extern.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/gbx/gbx_subr_extern.c b/main/gbx/gbx_subr_extern.c index f6d57e8a4..22fc447ab 100644 --- a/main/gbx/gbx_subr_extern.c +++ b/main/gbx/gbx_subr_extern.c @@ -244,7 +244,8 @@ void SUBR_ptr(ushort code) ptr = SUBR_get_pointer_or_string(PARAM); CHECK_enter(); - VALUE_read(RETURN, ptr, code & 0xF); + if (setjmp(CHECK_jump) == 0) + VALUE_read(RETURN, ptr, code & 0xF); CHECK_leave(); if (CHECK_got_error())