From 1b99fbe8f1ed53c4f630a0cb3f0b4d0afe99c256 Mon Sep 17 00:00:00 2001
From: Andreas Sigfridsson <sigge@lysator.liu.se>
Date: Sun, 12 Nov 2000 11:18:49 +0100
Subject: [PATCH] Show the index in the 'Indexing a NULL value.' error message.

Rev: src/opcodes.c:1.92
---
 src/opcodes.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/opcodes.c b/src/opcodes.c
index e73078403b..70bbd11347 100644
--- a/src/opcodes.c
+++ b/src/opcodes.c
@@ -26,7 +26,7 @@
 #include "bignum.h"
 #include "operators.h"
 
-RCSID("$Id: opcodes.c,v 1.91 2000/11/01 23:32:32 grubba Exp $");
+RCSID("$Id: opcodes.c,v 1.92 2000/11/12 10:18:49 sigge Exp $");
 
 void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)
 {
@@ -51,8 +51,11 @@ void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)
 	if (val) {
 	  error("Indexing the integer %d with an unknown method.\n", val);
 	} else {
-	  error("Indexing the NULL value.\n");
-	}
+          if(ind->type == T_STRING)
+            error("Indexing the NULL value with \"%s\".\n", ind->u.string->str);
+          else
+            error("Indexing the NULL value.\n");
+       }
       }
     }
     break;
-- 
GitLab