Branch: Tag:

1997-03-11

1997-03-11 03:47:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

fp->num_args wasn't initialized when calling C-functions.

Rev: src/interpret.c:1.32

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.31 1997/03/11 03:36:39 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.32 1997/03/11 03:47:33 grubba Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
1318: Inside #if defined(DEBUG)
  #ifdef DEBUG    if(d_flag) check_threads_etc();   #endif +  new_frame.num_args=args; +  new_frame.num_locals=0;    (*function->func.c_fun)(args);    }else{    int num_args;
1355: Inside #if defined(DEBUG)
   if(num_locals < num_args)    fatal("Wrong number of arguments or locals in function def.\n");   #endif -  fp->num_locals=num_locals; -  fp->num_args=num_args; +  new_frame.num_locals=num_locals; +  new_frame.num_args=num_args;    eval_instruction(pc);   #ifdef DEBUG    if(sp<evaluator_stack)