mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Fix MDR surface indexes overflow check
Also, use the check overflow macro like everywhere else.
This commit is contained in:
parent
1a7628126a
commit
c755d75a5e
2 changed files with 2 additions and 2 deletions
|
@ -346,7 +346,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
|
||||||
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
|
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
|
||||||
backEnd.currentEntity->e.oldframe * frameSize );
|
backEnd.currentEntity->e.oldframe * frameSize );
|
||||||
|
|
||||||
RB_CheckOverflow( surface->numVerts, surface->numTriangles );
|
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );
|
||||||
|
|
||||||
triangles = (int *) ((byte *)surface + surface->ofsTriangles);
|
triangles = (int *) ((byte *)surface + surface->ofsTriangles);
|
||||||
indexes = surface->numTriangles * 3;
|
indexes = surface->numTriangles * 3;
|
||||||
|
|
|
@ -350,7 +350,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
|
||||||
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
|
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
|
||||||
backEnd.currentEntity->e.oldframe * frameSize );
|
backEnd.currentEntity->e.oldframe * frameSize );
|
||||||
|
|
||||||
RB_CheckOverflow( surface->numVerts, surface->numTriangles );
|
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );
|
||||||
|
|
||||||
triangles = (int *) ((byte *)surface + surface->ofsTriangles);
|
triangles = (int *) ((byte *)surface + surface->ofsTriangles);
|
||||||
indexes = surface->numTriangles * 3;
|
indexes = surface->numTriangles * 3;
|
||||||
|
|
Loading…
Reference in a new issue