summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 12:28:23 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 12:28:23 +0000
commitb47c0ac38a3b04b6e5b0001608e726de3e93448f (patch)
tree1fd57baea39d4635bca3b283d920501505932274 /src
parentb005a0e1890c0dc1477a97affb0de382060b53d9 (diff)
downloadhercules-b47c0ac38a3b04b6e5b0001608e726de3e93448f.tar.gz
hercules-b47c0ac38a3b04b6e5b0001608e726de3e93448f.tar.bz2
hercules-b47c0ac38a3b04b6e5b0001608e726de3e93448f.tar.xz
hercules-b47c0ac38a3b04b6e5b0001608e726de3e93448f.zip
Fixed getcharid according to samples and docs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9098 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c4
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)