From 802eb6dfaffb6efba11705fcce16eed8a6e34bad Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 17 Oct 2015 21:57:16 -0500 Subject: Replace 4 with sizeof( int ) in R_GetCommandBufferReserved --- src/renderergl1/tr_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderergl1') 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 -- cgit