Skip to content

Commit

Permalink
Replace NULL by '\0' in some char comparison
Browse files Browse the repository at this point in the history
fix some Warning: pointer-arith in Player.cpp

Signed-off-by: XoD <xoddark@gmail.com>
  • Loading branch information
XoD committed Dec 21, 2011
1 parent 7db8be7 commit 61c9f62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neo/d3xp/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4140,7 +4140,7 @@ idPlayer::GiveVideo
*/
void idPlayer::GiveVideo( const char *videoName, idDict *item ) {

if ( videoName == NULL || *videoName == NULL ) {
if ( videoName == NULL || *videoName == '\0' ) {
return;
}

Expand Down Expand Up @@ -4177,7 +4177,7 @@ idPlayer::GiveEmail
*/
void idPlayer::GiveEmail( const char *emailName ) {

if ( emailName == NULL || *emailName == NULL ) {
if ( emailName == NULL || *emailName == '\0' ) {
return;
}

Expand All @@ -4204,7 +4204,7 @@ void idPlayer::GivePDA( const char *pdaName, idDict *item )
inventory.pdaSecurity.AddUnique( item->GetString( "inv_name" ) );
}

if ( pdaName == NULL || *pdaName == NULL ) {
if ( pdaName == NULL || *pdaName == '\0' ) {
pdaName = "personal";
}

Expand Down Expand Up @@ -6297,7 +6297,7 @@ void idPlayer::UpdatePDAInfo( bool updatePDASel ) {

const char *security = pda->GetSecurity();
if ( j == currentPDA || (currentPDA == 0 && security && *security ) ) {
if ( *security == NULL ) {
if ( *security == '\0' ) {
security = common->GetLanguageDict()->GetString( "#str_00066" );
}
objectiveSystem->SetStateString( "PDASecurityClearance", security );
Expand Down

0 comments on commit 61c9f62

Please sign in to comment.