mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-09-04 13:59:04 +00:00
Remove flexible array member
This commit is contained in:
parent
98c6acbf11
commit
44ae520284
@ -415,7 +415,7 @@ unsigned char* artLockFrameData(int fid, int frame, int direction, CacheEntry**
|
||||
frm = artGetFrame(art, frame, direction);
|
||||
if (frm != NULL) {
|
||||
|
||||
return frm->data;
|
||||
return (unsigned char*)frm + sizeof(*frm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ unsigned char* artGetFrameData(Art* art, int frame, int direction)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return frm->data;
|
||||
return (unsigned char*)frm + sizeof(*frm);
|
||||
}
|
||||
|
||||
// 0x419880
|
||||
@ -795,9 +795,9 @@ ArtFrame* artGetFrame(Art* art, int frame, int rotation)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ArtFrame* frm = (ArtFrame*)(art->data + art->dataOffsets[rotation]);
|
||||
ArtFrame* frm = (ArtFrame*)((unsigned char*)art + sizeof(*art) + art->dataOffsets[rotation]);
|
||||
for (int index = 0; index < frame; index++) {
|
||||
frm = (ArtFrame*)(frm->data + frm->size);
|
||||
frm = (ArtFrame*)((unsigned char*)frm + sizeof(*frm) + frm->size);
|
||||
}
|
||||
return frm;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user