[INTERPRETER]

* BUG: Fix a crash when the first use of a class symbol recursively calls 
  the current function being executed.


git-svn-id: svn://localhost/gambas/trunk@6383 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-07-16 00:57:45 +00:00
parent 08b5987282
commit 8b61ab1e65
3 changed files with 7 additions and 4 deletions

View file

@ -203,7 +203,7 @@ void EXEC_special_inheritance(int special, CLASS *class, OBJECT *object, int npa
void EXEC_nop(void);
void EXEC_push_unknown(ushort code);
void EXEC_push_unknown(void);
void EXEC_push_array(ushort code);
int EXEC_push_unknown_event(bool unknown);
//void EXEC_push_special(void);

View file

@ -574,7 +574,7 @@ _PUSH_ARRAY:
_PUSH_UNKNOWN:
EXEC_push_unknown(code);
EXEC_push_unknown();
goto _NEXT;
/*-----------------------------------------------*/

View file

@ -34,7 +34,7 @@
#include "gbx_struct.h"
#include "gbx_local.h"
void EXEC_push_unknown(ushort code)
void EXEC_push_unknown(void)
{
static void *jump[] = {
&&_PUSH_GENERIC, // 0
@ -62,9 +62,12 @@ void EXEC_push_unknown(ushort code)
bool defined;
VALUE *val;
// EXEC_object can change *PC by calling EXEC_push_unknown() recursively
// So don't store *PC anywhere
defined = EXEC_object(&SP[-1], &class, &object);
goto *jump[code & 0xF];
goto *jump[*PC & 0xF];
_PUSH_GENERIC: