In gl_model.c in the Mod_LoadLeafs function,
Code: Select all
out->firstmarksurface = loadmodel->marksurfaces +
LittleShort(in->firstleafface);
Sometimes in->firstleafface is equal to loadmodel->nummarksurfaces. That means out->firstmarksurface is actually out of bounds. I'm trying to figure out why this is sometimes the case. Is it a bug in the compiler? Should this be a special case? What should I do with these?