diff options
author | Zack Middleton <zturtleman@gmail.com> | 2015-10-17 21:57:16 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:12:56 +0100 |
commit | 802eb6dfaffb6efba11705fcce16eed8a6e34bad (patch) | |
tree | 308b79d10b427840d1d2d02035354b2f9d6d6c5e /src/renderergl1 | |
parent | 6c232efd91fd288342bc6865a36fa1c8c0a23575 (diff) |
Replace 4 with sizeof( int ) in R_GetCommandBufferReserved
Diffstat (limited to 'src/renderergl1')
-rw-r--r-- | src/renderergl1/tr_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl1/tr_cmds.c b/src/renderergl1/tr_cmds.c index 58f199e3..d92a8b94 100644 --- a/src/renderergl1/tr_cmds.c +++ b/src/renderergl1/tr_cmds.c @@ -127,8 +127,8 @@ void *R_GetCommandBufferReserved( int bytes, int reservedBytes ) { bytes = PAD(bytes, sizeof(void *)); // always leave room for the end of list command - if ( cmdList->used + bytes + 4 + reservedBytes > MAX_RENDER_COMMANDS ) { - if ( bytes > MAX_RENDER_COMMANDS - 4 ) { + if ( cmdList->used + bytes + sizeof( int ) + reservedBytes > MAX_RENDER_COMMANDS ) { + if ( bytes > MAX_RENDER_COMMANDS - sizeof( int ) ) { ri.Error( ERR_FATAL, "R_GetCommandBuffer: bad size %i", bytes ); } // if we run out of room, just start dropping commands |