mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-13 07:57:23 +00:00
Replace 4 with sizeof( int ) in R_GetCommandBufferReserved
This commit is contained in:
parent
81e2b6c0cf
commit
41f83ac8b0
2 changed files with 4 additions and 4 deletions
|
@ -126,8 +126,8 @@ void *R_GetCommandBufferReserved( int bytes, int reservedBytes ) {
|
||||||
bytes = PAD(bytes, sizeof(void *));
|
bytes = PAD(bytes, sizeof(void *));
|
||||||
|
|
||||||
// always leave room for the end of list command
|
// always leave room for the end of list command
|
||||||
if ( cmdList->used + bytes + 4 + reservedBytes > MAX_RENDER_COMMANDS ) {
|
if ( cmdList->used + bytes + sizeof( int ) + reservedBytes > MAX_RENDER_COMMANDS ) {
|
||||||
if ( bytes > MAX_RENDER_COMMANDS - 4 ) {
|
if ( bytes > MAX_RENDER_COMMANDS - sizeof( int ) ) {
|
||||||
ri.Error( ERR_FATAL, "R_GetCommandBuffer: bad size %i", bytes );
|
ri.Error( ERR_FATAL, "R_GetCommandBuffer: bad size %i", bytes );
|
||||||
}
|
}
|
||||||
// if we run out of room, just start dropping commands
|
// if we run out of room, just start dropping commands
|
||||||
|
|
|
@ -133,8 +133,8 @@ void *R_GetCommandBufferReserved( int bytes, int reservedBytes ) {
|
||||||
bytes = PAD(bytes, sizeof(void *));
|
bytes = PAD(bytes, sizeof(void *));
|
||||||
|
|
||||||
// always leave room for the end of list command
|
// always leave room for the end of list command
|
||||||
if ( cmdList->used + bytes + 4 + reservedBytes > MAX_RENDER_COMMANDS ) {
|
if ( cmdList->used + bytes + sizeof( int ) + reservedBytes > MAX_RENDER_COMMANDS ) {
|
||||||
if ( bytes > MAX_RENDER_COMMANDS - 4 ) {
|
if ( bytes > MAX_RENDER_COMMANDS - sizeof( int ) ) {
|
||||||
ri.Error( ERR_FATAL, "R_GetCommandBuffer: bad size %i", bytes );
|
ri.Error( ERR_FATAL, "R_GetCommandBuffer: bad size %i", bytes );
|
||||||
}
|
}
|
||||||
// if we run out of room, just start dropping commands
|
// if we run out of room, just start dropping commands
|
||||||
|
|
Loading…
Reference in a new issue