mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
cleaned up code: various stuff (out-of-bounds, null-pointer, uninitialized vars,...) (by CleaningWoman)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6101 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-4
@@ -1543,7 +1543,7 @@ void HandleTalkingSpeck()
|
||||
gsSpeckDialogueTextPopUp[0] = '\0';
|
||||
|
||||
//Start speck talking
|
||||
if( gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_SPEECH_NOT_TALKING || gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_HAS_TO_TALK_BUT_QUOTE_NOT_CHOSEN_YET )
|
||||
if( gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_SPEECH_NOT_TALKING && gusMercVideoSpeckSpeech != MERC_VIDEO_SPECK_HAS_TO_TALK_BUT_QUOTE_NOT_CHOSEN_YET )
|
||||
StartSpeckTalking( gusMercVideoSpeckSpeech );
|
||||
|
||||
gusMercVideoSpeckSpeech = MERC_VIDEO_SPECK_SPEECH_NOT_TALKING;
|
||||
@@ -2462,7 +2462,7 @@ INT16 GetRandomQuoteThatHasBeenSaidTheLeast( )
|
||||
if( CanMercQuoteBeSaid( gNumberOfTimesQuoteSaid[cnt].ubQuoteID ) )
|
||||
{
|
||||
//if this quote has been said less times then the last one
|
||||
if( gNumberOfTimesQuoteSaid[cnt].uiNumberOfTimesQuoteSaid < gNumberOfTimesQuoteSaid[ sSmallestNumber ].uiNumberOfTimesQuoteSaid )
|
||||
if( sSmallestNumber==255 || gNumberOfTimesQuoteSaid[cnt].uiNumberOfTimesQuoteSaid < gNumberOfTimesQuoteSaid[ sSmallestNumber ].uiNumberOfTimesQuoteSaid )
|
||||
{
|
||||
sSmallestNumber = cnt;
|
||||
}
|
||||
@@ -2688,7 +2688,6 @@ void MakeBiffAwayForCoupleOfDays()
|
||||
|
||||
BOOLEAN AreAnyOfTheNewMercsAvailable()
|
||||
{
|
||||
UINT8 i;
|
||||
UINT8 ubMercID;
|
||||
|
||||
|
||||
@@ -2696,7 +2695,7 @@ BOOLEAN AreAnyOfTheNewMercsAvailable()
|
||||
return( FALSE );
|
||||
|
||||
//for(i=(LARRY_NORMAL-BIFF); i<=LaptopSaveInfo.gubLastMercIndex; i++)
|
||||
for(i=0; i<=NUM_PROFILES; i++)
|
||||
for(UINT16 i=0; i<=NUM_PROFILES; i++)
|
||||
{
|
||||
if ( gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gProfilesMERC[i].ProfilId != 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user