Can you try to add many normal printf's to this function in https://github.com/kungfooman/libcod...master/gsc.cpp ?
printf by printf you will get nearer to the buggy function.PHP Code:
int cdecl_injected_closer()
{
int function;
int playerid;