Answer the question
In order to leave comments, you need to log in
Why does this realloc function call throw an exception?
Actually what is the reason? Starting from the second line
if ((rwOBJECT_VERTEX_UV & g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.Header.Flags1) == rwOBJECT_VERTEX_UV){
g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.UV =
(Vector2f*)realloc(
g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.UV,
sizeof(Vector2f)*g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.Header.VertexCount
);//SetLength(UV, Header.VertexCount);
fread(&g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.UV[0],
1,8* g_Clump->GeometryList.Geometry[g_Clump->GeometryList.GeometryCount - 1].Data.Header.VertexCount,
stream);
}
g_Clump->GeometryList.Geometry = (DFFGeometry*)realloc(g_Clump->GeometryList.Geometry, g_Clump->GeometryList.GeometryCount);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question