Skip to content
Snippets Groups Projects
Commit e747d8b5 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Improved error message.

Rev: src/opcodes.c:1.25
parent 2dfa5b86
Branches
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "builtin_functions.h" #include "builtin_functions.h"
#include "module_support.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) 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) ...@@ -55,7 +55,7 @@ void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)
if(i<0) if(i<0)
i+=what->u.string->len; i+=what->u.string->len;
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 else
i=EXTRACT_UCHAR(what->u.string->str + i); i=EXTRACT_UCHAR(what->u.string->str + i);
to->type=T_INT; to->type=T_INT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment