-upsized loop variable in FindReplacementMagazine in Items.xml from a UINT8 to a UINT16

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@389 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-08-01 21:27:02 +00:00
parent 7a50c7acda
commit c3f12c6f25
2 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else #else
//RELEASE BUILD VERSION //RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.386" }; INT16 zVersionLabel[256] = { L"Release v1.13.389" };
#endif #endif
INT8 czVersionNumber[16] = { "Build 06.07.31" }; INT8 czVersionNumber[16] = { "Build 06.08.01" };
INT16 zTrackingNumber[16] = { L"Z" }; INT16 zTrackingNumber[16] = { L"Z" };
+10 -10
View File
@@ -4432,32 +4432,32 @@ UINT16 DefaultMagazine( UINT16 usItem )
UINT16 FindReplacementMagazine( UINT8 ubCalibre, UINT8 ubMagSize, UINT8 ubAmmoType ) UINT16 FindReplacementMagazine( UINT8 ubCalibre, UINT8 ubMagSize, UINT8 ubAmmoType )
{ {
UINT8 ubLoop; UINT16 usLoop;
UINT16 usDefault; UINT16 usDefault;
ubLoop = 0; usLoop = 0;
usDefault = NOTHING; usDefault = NOTHING;
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: calibre = %d, Mag size = %d, ammo type = %d",ubCalibre,ubMagSize,ubAmmoType)); DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: calibre = %d, Mag size = %d, ammo type = %d",ubCalibre,ubMagSize,ubAmmoType));
while ( Magazine[ubLoop].ubCalibre != NOAMMO ) while ( Magazine[usLoop].ubCalibre != NOAMMO )
{ {
if (Magazine[ubLoop].ubCalibre == ubCalibre && if (Magazine[usLoop].ubCalibre == ubCalibre &&
Magazine[ubLoop].ubMagSize == ubMagSize ) Magazine[usLoop].ubMagSize == ubMagSize )
{ {
if ( Magazine[ubLoop].ubAmmoType == ubAmmoType ) if ( Magazine[usLoop].ubAmmoType == ubAmmoType )
{ {
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning item = %d",MagazineClassIndexToItemType( ubLoop ))); DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning item = %d",MagazineClassIndexToItemType( usLoop )));
return( MagazineClassIndexToItemType( ubLoop ) ); return( MagazineClassIndexToItemType( usLoop ) );
} }
else if ( usDefault == NOTHING ) else if ( usDefault == NOTHING )
{ {
// store this one to use if all else fails // store this one to use if all else fails
usDefault = MagazineClassIndexToItemType( ubLoop ); usDefault = MagazineClassIndexToItemType( usLoop );
} }
} }
ubLoop++; usLoop++;
} }
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning default item = %d",usDefault)); DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning default item = %d",usDefault));