Branch: Tag:

1998-02-03

1998-02-03 05:29:29 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

core-dumping bug fixed + more debug added

Rev: src/array.c:1.27
Rev: src/interpret.c:1.67
Rev: src/main.c:1.40
Rev: src/main.h:1.6
Rev: src/object.c:1.37
Rev: src/signal_handler.c:1.29
Rev: src/signal_handler.h:1.5
Rev: src/svalue.c:1.19

58:       /* for now, we don't know what will go in here */    v->type_field=BIT_MIXED | BIT_UNFINISHED; +  v->flags=0;       v->malloced_size=size+extra_space;    v->size=size;
770:       t=0;    +  if(v->flags & ARRAY_LVALUE) +  { +  v->type_field=BIT_MIXED; +  return; +  } +     for(e=0; e<v->size; e++) t |= 1 << ITEM(v)[e].type;      #ifdef DEBUG
788: Inside #if defined(DEBUG)
      t=0;    -  for(e=0; e<v->size; e++) t |= 1 << ITEM(v)[e].type; +  if(v->flags & ARRAY_LVALUE) +  return;    -  +  for(e=0; e<v->size; e++) +  { +  if(ITEM(v)[e].type > MAX_TYPE) +  fatal("Type is out of range.\n"); +  +  t |= 1 << ITEM(v)[e].type; +  } +     if(t & ~(v->type_field))    fatal("Type field out of order!\n");   }