diff --git a/src/ChangeLog b/src/ChangeLog index 01da6eea9f05db8e147024191cdc59dc84310fe1..54d89cb58c1b978e1708c3c7466cc33a33988923 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 5 04:18:41 1996 Per Hedbor <per@puck.infovav.se> + + * interpret.c (lvalue_to_svalue_no_free): Added special error + message for indexing of 0. + Wed Dec 4 16:33:53 1996 Fredrik Hubinette <hubbe@cytocin.hubbe.net> * callback.c: fixed a memory leak and added more debug diff --git a/src/interpret.c b/src/interpret.c index 1cb4bc837b99b27edfe47bb02ae657cd0e1180ec..4ba4882ba93e283ae2d58bc71d49437fa6820563 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: interpret.c,v 1.15 1996/12/03 21:41:18 hubbe Exp $"); +RCSID("$Id: interpret.c,v 1.16 1996/12/05 03:23:48 per Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -192,7 +192,10 @@ void lvalue_to_svalue_no_free(struct svalue *to,struct svalue *lval) break; default: - error("Indexing a basic type.\n"); + if(IS_ZERO(lval)) + error("Indexing the NULL value.\n"); /* Per */ + else + error("Indexing a basic type.\n"); } } @@ -228,7 +231,10 @@ void assign_lvalue(struct svalue *lval,struct svalue *from) break; default: - error("Indexing a basic type.\n"); + if(IS_ZERO(lval)) + error("Indexing the NULL value.\n"); /* Per */ + else + error("Indexing a basic type.\n"); } } @@ -256,7 +262,10 @@ union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t) case T_MULTISET: return 0; default: - error("Indexing a basic type.\n"); + if(IS_ZERO(lval)) + error("Indexing the NULL value.\n"); /* Per */ + else + error("Indexing a basic type.\n"); return 0; } }