diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 50c665086..d277065fb 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5636,8 +5636,8 @@ int buildin_getcharid(struct script_state *st) sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+3]))); else sd=script_rid2sd(st); - if(sd==NULL){ - push_val(st->stack,C_INT,-1); + if(sd==NULL || num<0 || num>3){ + push_val(st->stack,C_INT,0); //return 0, according docs return 0; } if(num==0) |