[ioquake3] 111/136: Fix 'missing token' in parsers for animations.cfg

Simon McVittie smcv at debian.org
Thu Jun 15 09:09:16 UTC 2017


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

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

commit d58234a6c7475ea57ab5783dd0a0dd6ca5e54583
Author: Zack Middleton <zack at cloemail.com>
Date:   Wed Jun 7 19:04:32 2017 -0500

    Fix 'missing token' in parsers for animations.cfg
---
 code/cgame/cg_players.c | 16 ++++++++--------
 code/q3_ui/ui_players.c | 16 ++++++++--------
 code/ui/ui_players.c    | 16 ++++++++--------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c
index 9c76aac..500c63b 100644
--- a/code/cgame/cg_players.c
+++ b/code/cgame/cg_players.c
@@ -128,12 +128,12 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 	while ( 1 ) {
 		prev = text_p;	// so we can unget
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		if ( !Q_stricmp( token, "footsteps" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			if ( !Q_stricmp( token, "default" ) || !Q_stricmp( token, "normal" ) ) {
@@ -153,7 +153,7 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 		} else if ( !Q_stricmp( token, "headoffset" ) ) {
 			for ( i = 0 ; i < 3 ; i++ ) {
 				token = COM_Parse( &text_p );
-				if ( !token ) {
+				if ( !token[0] ) {
 					break;
 				}
 				ci->headOffset[i] = atof( token );
@@ -161,7 +161,7 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 			continue;
 		} else if ( !Q_stricmp( token, "sex" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			if ( token[0] == 'f' || token[0] == 'F' ) {
@@ -192,7 +192,7 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 	for ( i = 0 ; i < MAX_ANIMATIONS ; i++ ) {
 
 		token = COM_Parse( &text_p );
-		if ( !*token ) {
+		if ( !token[0] ) {
 			if( i >= TORSO_GETFLAG && i <= TORSO_NEGATIVE ) {
 				animations[i].firstFrame = animations[TORSO_GESTURE].firstFrame;
 				animations[i].frameLerp = animations[TORSO_GESTURE].frameLerp;
@@ -215,7 +215,7 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 		}
 
 		token = COM_Parse( &text_p );
-		if ( !*token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].numFrames = atoi( token );
@@ -229,13 +229,13 @@ static qboolean	CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
 		}
 
 		token = COM_Parse( &text_p );
-		if ( !*token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].loopFrames = atoi( token );
 
 		token = COM_Parse( &text_p );
-		if ( !*token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		fps = atof( token );
diff --git a/code/q3_ui/ui_players.c b/code/q3_ui/ui_players.c
index d8794cb..b40ec90 100644
--- a/code/q3_ui/ui_players.c
+++ b/code/q3_ui/ui_players.c
@@ -964,26 +964,26 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 	while ( 1 ) {
 		prev = text_p;	// so we can unget
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		if ( !Q_stricmp( token, "footsteps" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			continue;
 		} else if ( !Q_stricmp( token, "headoffset" ) ) {
 			for ( i = 0 ; i < 3 ; i++ ) {
 				token = COM_Parse( &text_p );
-				if ( !token ) {
+				if ( !token[0] ) {
 					break;
 				}
 			}
 			continue;
 		} else if ( !Q_stricmp( token, "sex" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			continue;
@@ -1002,7 +1002,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 	for ( i = 0 ; i < MAX_ANIMATIONS ; i++ ) {
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].firstFrame = atoi( token );
@@ -1015,19 +1015,19 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 		}
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].numFrames = atoi( token );
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].loopFrames = atoi( token );
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		fps = atof( token );
diff --git a/code/ui/ui_players.c b/code/ui/ui_players.c
index 53475d3..87812ef 100644
--- a/code/ui/ui_players.c
+++ b/code/ui/ui_players.c
@@ -1051,26 +1051,26 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 	while ( 1 ) {
 		prev = text_p;	// so we can unget
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		if ( !Q_stricmp( token, "footsteps" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			continue;
 		} else if ( !Q_stricmp( token, "headoffset" ) ) {
 			for ( i = 0 ; i < 3 ; i++ ) {
 				token = COM_Parse( &text_p );
-				if ( !token ) {
+				if ( !token[0] ) {
 					break;
 				}
 			}
 			continue;
 		} else if ( !Q_stricmp( token, "sex" ) ) {
 			token = COM_Parse( &text_p );
-			if ( !token ) {
+			if ( !token[0] ) {
 				break;
 			}
 			continue;
@@ -1089,7 +1089,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 	for ( i = 0 ; i < MAX_ANIMATIONS ; i++ ) {
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].firstFrame = atoi( token );
@@ -1102,19 +1102,19 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
 		}
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].numFrames = atoi( token );
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		animations[i].loopFrames = atoi( token );
 
 		token = COM_Parse( &text_p );
-		if ( !token ) {
+		if ( !token[0] ) {
 			break;
 		}
 		fps = atof( token );

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



More information about the Pkg-games-commits mailing list