Materials_getRaceEx finally works as expected

develop
doomchild 2011-03-11 14:10:51 -06:00
parent 49b7f8acb5
commit b9e8aa8952
1 changed files with 2 additions and 11 deletions

@ -395,18 +395,9 @@ c_creaturetype* Materials_getRaceEx(DFHackObject* mat)
{ {
c_creaturetype* buf = NULL; c_creaturetype* buf = NULL;
if(alloc_creaturetype_buffer_callback == NULL) CreatureTypeConvert(((DFHack::Materials*)mat)->raceEx, &buf);
return NULL;
((*alloc_creaturetype_buffer_callback)(&buf, matSize));
if(buf != NULL) return buf;
{
for(int i = 0; i < matSize; i++)
CreatureTypeConvert(&materials->raceEx[i], &(buf[i]));
return buf;
}
} }
} }