diff --git a/code/renderergl1/tr_cmds.c b/code/renderergl1/tr_cmds.c index 19094700..6a4a319c 100644 --- a/code/renderergl1/tr_cmds.c +++ b/code/renderergl1/tr_cmds.c @@ -147,7 +147,7 @@ returns NULL if there is not enough space for important commands ============= */ void *R_GetCommandBuffer( int bytes ) { - return R_GetCommandBufferReserved( bytes, sizeof ( swapBuffersCommand_t ) ); + return R_GetCommandBufferReserved( bytes, PAD( sizeof( swapBuffersCommand_t ), sizeof(void *) ) ); } diff --git a/code/renderergl2/tr_cmds.c b/code/renderergl2/tr_cmds.c index 0f48727d..79706d25 100644 --- a/code/renderergl2/tr_cmds.c +++ b/code/renderergl2/tr_cmds.c @@ -154,7 +154,7 @@ returns NULL if there is not enough space for important commands ============= */ void *R_GetCommandBuffer( int bytes ) { - return R_GetCommandBufferReserved( bytes, sizeof ( swapBuffersCommand_t ) ); + return R_GetCommandBufferReserved( bytes, PAD( sizeof( swapBuffersCommand_t ), sizeof(void *) ) ); }