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:
Flugente
2013-05-27 20:38:52 +00:00
parent 921394b24c
commit f92f70c78d
39 changed files with 167 additions and 149 deletions
+3 -4
View File
@@ -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 )
{