[openjk] 07/11: Add patch fixing an uninitialized variable

Simon McVittie smcv at debian.org
Sun Jan 4 21:54:44 UTC 2015


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

smcv pushed a commit to branch master
in repository openjk.

commit 6ac1e15340b08e4a9c8bab9628db56752d611345
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Jan 4 10:43:41 2015 +0000

    Add patch fixing an uninitialized variable
---
 .../Fix-use-of-uninitialized-variable.patch        | 23 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 24 insertions(+)

diff --git a/debian/patches/Fix-use-of-uninitialized-variable.patch b/debian/patches/Fix-use-of-uninitialized-variable.patch
new file mode 100644
index 0000000..16511e5
--- /dev/null
+++ b/debian/patches/Fix-use-of-uninitialized-variable.patch
@@ -0,0 +1,23 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sun, 4 Jan 2015 00:05:34 +0000
+Subject: Fix use of uninitialized variable
+
+We shouldn't use clampMin or clampMax until they have been set,
+at which point setAngles becomes true.
+---
+ codemp/game/bg_pmove.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c
+index 11d0b67..776f19b 100644
+--- a/codemp/game/bg_pmove.c
++++ b/codemp/game/bg_pmove.c
+@@ -9625,7 +9625,7 @@ static QINLINE void PM_CmdForSaberMoves(usercmd_t *ucmd)
+ void PM_VehicleViewAngles(playerState_t *ps, bgEntity_t *veh, usercmd_t *ucmd)
+ {
+ 	Vehicle_t *pVeh = veh->m_pVehicle;
+-	qboolean setAngles = qtrue;
++	qboolean setAngles = qfalse;
+ 	vec3_t clampMin;
+ 	vec3_t clampMax;
+ 	int i;
diff --git a/debian/patches/series b/debian/patches/series
index 6775ce1..ecf72e8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ Only-require-glext.h-on-Windows.patch
 g_utils-stub-out-debug-code-to-write-to-a-misc-Windo.patch
 Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch
 Use-NET_Sleep-or-Sys_Sleep-for-SP-to-avoid-busy-wait.patch
+Fix-use-of-uninitialized-variable.patch

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



More information about the Pkg-games-commits mailing list