[openjk] 128/130: d/p/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch: fix one more instance of the same issue

Simon McVittie smcv at debian.org
Fri Oct 28 11:09:28 UTC 2016


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

smcv pushed a commit to branch debian/master
in repository openjk.

commit 151415d8a20bed81dcdff5e112b56a1bb2a89c60
Author: Simon McVittie <smcv at debian.org>
Date:   Fri Oct 28 11:52:34 2016 +0100

    d/p/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch: fix one more instance of the same issue
---
 debian/changelog                                   |  2 ++
 ...arning-when-sscanf-writes-qboolean-throug.patch | 33 ++++++++++++++++++++--
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 02bf03b..eac2fd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ openjk (0~20161025+dfsg1-1) UNRELEASED; urgency=medium
     d/p/g_svcmds-fix-typo-in-avoiding-non-C-11-compliant-string-s.patch,
     d/p/savegames-bounds-check-some-string-lengths-to-prevent-buf.patch:
     more bugfix patches
+  * d/p/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch:
+    fix one more instance of the same issue
 
  -- Simon McVittie <smcv at debian.org>  Fri, 28 Oct 2016 10:57:57 +0100
 
diff --git a/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch b/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
index 60fd760..532090a 100644
--- a/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
+++ b/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
@@ -6,9 +6,10 @@ Subject: Avoid compiler warning when sscanf writes qboolean through %i
 
 Forwarded: https://github.com/JACoders/OpenJK/pull/872
 ---
- code/game/g_client.cpp  | 36 ++++++++++++++++++++----------------
- code/game/g_session.cpp |  4 +++-
- 2 files changed, 23 insertions(+), 17 deletions(-)
+ code/game/g_client.cpp    | 36 ++++++++++++++++++++----------------
+ code/game/g_session.cpp   |  4 +++-
+ codeJK2/game/g_client.cpp |  4 +++-
+ 3 files changed, 26 insertions(+), 18 deletions(-)
 
 diff --git a/code/game/g_client.cpp b/code/game/g_client.cpp
 index 278645f..9c05053 100644
@@ -102,3 +103,29 @@ index 09f6f60..6cde682 100644
  
  	var = va( "missionstats%i", client - level.clients );
  	gi.Cvar_VariableStringBuffer( var, s, sizeof(s) );
+diff --git a/codeJK2/game/g_client.cpp b/codeJK2/game/g_client.cpp
+index 3522f95..9367b33 100644
+--- a/codeJK2/game/g_client.cpp
++++ b/codeJK2/game/g_client.cpp
+@@ -696,6 +696,7 @@ void Player_RestoreFromPrevLevel(gentity_t *ent)
+ 	{
+ 		char	s[MAX_STRING_CHARS];
+ 		const char	*var;
++		int saberActive;
+ 
+ 		gi.Cvar_VariableStringBuffer( sCVARNAME_PLAYERSAVE, s, sizeof(s) );
+ 
+@@ -714,11 +715,12 @@ void Player_RestoreFromPrevLevel(gentity_t *ent)
+ 								&client->ps.viewangles[2],
+ 								&client->ps.forcePowersKnown,
+ 								&client->ps.forcePower,
+-								&client->ps.saberActive,
++								&saberActive,
+ 								&client->ps.saberAnimLevel,
+ 								&client->ps.saberLockEnemy,
+ 								&client->ps.saberLockTime
+ 					);
++			client->ps.saberActive = (saberActive ? qtrue : qfalse);
+ 			ent->health = client->ps.stats[STAT_HEALTH];
+ 
+ // slight issue with ths for the moment in that although it'll correctly restore angles it doesn't take into account

-- 
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