[iortcw] 414/497: All: Fix reserved size for swap buffer command being too small on x86_64

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit c6570fc9ca39ccef1a9c12af89a4bff5b4ebd36f
Author: Donny <M4N4T4RMS at gmail.com>
Date:   Tue Oct 20 07:58:54 2015 -0400

    All: Fix reserved size for swap buffer command being too small on x86_64
---
 MP/code/rend2/tr_cmds.c    | 2 +-
 MP/code/renderer/tr_cmds.c | 2 +-
 SP/code/rend2/tr_cmds.c    | 2 +-
 SP/code/renderer/tr_cmds.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/MP/code/rend2/tr_cmds.c b/MP/code/rend2/tr_cmds.c
index 6d7555f..e4b0b3f 100644
--- a/MP/code/rend2/tr_cmds.c
+++ b/MP/code/rend2/tr_cmds.c
@@ -168,7 +168,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/MP/code/renderer/tr_cmds.c b/MP/code/renderer/tr_cmds.c
index 390f680..06511c4 100644
--- a/MP/code/renderer/tr_cmds.c
+++ b/MP/code/renderer/tr_cmds.c
@@ -161,7 +161,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/SP/code/rend2/tr_cmds.c b/SP/code/rend2/tr_cmds.c
index 940bcbe..578353b 100644
--- a/SP/code/rend2/tr_cmds.c
+++ b/SP/code/rend2/tr_cmds.c
@@ -162,7 +162,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/SP/code/renderer/tr_cmds.c b/SP/code/renderer/tr_cmds.c
index 7cef1e2..deb3e6b 100644
--- a/SP/code/renderer/tr_cmds.c
+++ b/SP/code/renderer/tr_cmds.c
@@ -155,7 +155,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 *) ) );
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list