diff options
author | Zack Middleton <zturtleman@gmail.com> | 2015-03-25 15:28:54 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2015-06-07 12:03:37 +0100 |
commit | da27b948bc67b804b7755478fd81ed7da31d6152 (patch) | |
tree | 446c8f5a3dca3df3824dee23c0c5186da4d187b4 | |
parent | 04fa89c0badebfe8e241ae87c501ebdc9016f36d (diff) |
Fix MDR surface indexes overflow check
Also, use the check overflow macro like everywhere else.
-rw-r--r-- | src/renderergl1/tr_animation.c | 2 | ||||
-rw-r--r-- | src/renderergl2/tr_animation.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl1/tr_animation.c b/src/renderergl1/tr_animation.c index 5f401370..af93727f 100644 --- a/src/renderergl1/tr_animation.c +++ b/src/renderergl1/tr_animation.c @@ -347,7 +347,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface ) oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames + backEnd.currentEntity->e.oldframe * frameSize ); - RB_CheckOverflow( surface->numVerts, surface->numTriangles ); + RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 ); triangles = (int *) ((byte *)surface + surface->ofsTriangles); indexes = surface->numTriangles * 3; diff --git a/src/renderergl2/tr_animation.c b/src/renderergl2/tr_animation.c index 54968613..b5dbc330 100644 --- a/src/renderergl2/tr_animation.c +++ b/src/renderergl2/tr_animation.c @@ -351,7 +351,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface ) oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames + backEnd.currentEntity->e.oldframe * frameSize ); - RB_CheckOverflow( surface->numVerts, surface->numTriangles ); + RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 ); triangles = (int *) ((byte *)surface + surface->ofsTriangles); indexes = surface->numTriangles * 3; |