fix -Waddress-of-packed-member
parent
856547be23
commit
c776924adf
|
@ -704,8 +704,8 @@ struct GroupFrame
|
||||||
//! Maximum vertex for all single frames
|
//! Maximum vertex for all single frames
|
||||||
Vertex max;
|
Vertex max;
|
||||||
|
|
||||||
//! Time for all single frames
|
//! List of times for all single frames
|
||||||
float time; // float[numframes]
|
float *times;
|
||||||
|
|
||||||
//! List of single frames
|
//! List of single frames
|
||||||
SimpleFrame *frames;
|
SimpleFrame *frames;
|
||||||
|
|
|
@ -427,8 +427,9 @@ void MDLImporter::InternReadFile_Quake1() {
|
||||||
pcFirstFrame = (MDL::SimpleFrame *)&pcFrames->frame;
|
pcFirstFrame = (MDL::SimpleFrame *)&pcFrames->frame;
|
||||||
} else {
|
} else {
|
||||||
// get the first frame in the group
|
// get the first frame in the group
|
||||||
BE_NCONST MDL::GroupFrame *pcFrames2 = (BE_NCONST MDL::GroupFrame *)pcFrames;
|
BE_NCONST MDL::GroupFrame *pcFrames2 = (BE_NCONST MDL::GroupFrame *)szCurrent;
|
||||||
pcFirstFrame = (MDL::SimpleFrame *)( &pcFrames2->time + pcFrames2->numframes );
|
pcFirstFrame = (MDL::SimpleFrame *)( szCurrent + sizeof(MDL::GroupFrame::type) + sizeof(MDL::GroupFrame::numframes)
|
||||||
|
+ sizeof(MDL::GroupFrame::min) + sizeof(MDL::GroupFrame::max) + sizeof(*MDL::GroupFrame::times) * pcFrames2->numframes );
|
||||||
}
|
}
|
||||||
BE_NCONST MDL::Vertex *pcVertices = (BE_NCONST MDL::Vertex *)((pcFirstFrame->name) + sizeof(pcFirstFrame->name));
|
BE_NCONST MDL::Vertex *pcVertices = (BE_NCONST MDL::Vertex *)((pcFirstFrame->name) + sizeof(pcFirstFrame->name));
|
||||||
VALIDATE_FILE_SIZE((const unsigned char *)(pcVertices + pcHeader->num_verts));
|
VALIDATE_FILE_SIZE((const unsigned char *)(pcVertices + pcHeader->num_verts));
|
||||||
|
|
Loading…
Reference in New Issue