Originally posted by [b]Ai4rei[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1236
Considering this piece of script:
CODE
payon,155,99,5 script TestNPC 885,{
atcommand "@unloadnpc TestNPC";
}
(Self unloading)
If you run the script, the map server crashes on (/src/map/script.c):
CODE
static int unget_com_data=-1;
int get_com(unsigned char *script,int *pos)
{
int i,j;
if(unget_com_data>=0){
i=unget_com_data;
unget_com_data=-1;
return i;
}
if(script[*pos]>=0x80){ // <-- crashes
return C_INT;
}
i=0; j=0;
while(script[*pos]>=0x40){
i=script[(*pos)++]<<j;
j+=6;
}
return i+(script[(*pos)++]<<j);
}
I remember that worked a time ago, and even if is a weird script, it still shouldn't crash the server.