Issue information

Issue ID
#940
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Feb 8, 2008 3:06
Last Post
Hercules Elf Bot
Feb 8, 2008 3:06
Confirmation
N/A

Hercules Elf Bot - Feb 8, 2008 3:06

Originally posted by [b]nimrod[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=940

charisalpha can't work in position 0
CODE
charisalpha("a001",0);

this command return 0!! result is wrong

fix!
QUOTE
BUILDIN_FUNC(charisalpha)
{
const char *str=script_getstr(st,2);
int pos=script_getnum(st,3);

int val = ( str && pos>=0 && (unsigned int)pos<strlen(str) ) ? ISALPHA( str[pos] ) : 0;

script_pushint(st,val);
return 0;
}