The function is in https://github.com/kungfooman/libcod...master/gsc.cpp
Now check in detail where it is crashingPHP Code:
// todo: check if the parameter really exists (number_of_params)
int stackGetParamInt(int param, int *value)
{
//printf("stackGetParamInt() start...");
aStackElement *scriptStack = *(aStackElement**)getStack();
aStackElement *arg = scriptStack - param;
if (arg->type != STACK_INT)
return 0;
*value = (int)arg->offsetData;
//printf("... end\n");
return 1;
}