From e747d8b5d155085c245389e312aec9d5f77d43cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 21 May 1998 01:08:12 +0200 Subject: [PATCH] Improved error message. Rev: src/opcodes.c:1.25 --- src/opcodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opcodes.c b/src/opcodes.c index 41755b1ad5..7c86e530dc 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -22,7 +22,7 @@ #include "builtin_functions.h" #include "module_support.h" -RCSID("$Id: opcodes.c,v 1.24 1998/05/16 10:58:31 hubbe Exp $"); +RCSID("$Id: opcodes.c,v 1.25 1998/05/20 23:08:12 grubba Exp $"); void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -55,7 +55,7 @@ void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) if(i<0) i+=what->u.string->len; if(i<0 || i>=what->u.string->len) - error("Index out of range.\n"); + error("Index %d is out of range 0 - %d.\n", i, what->u.string->len-1); else i=EXTRACT_UCHAR(what->u.string->str + i); to->type=T_INT; -- GitLab