mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Fix: UB cannot be compiled
- Fixed a few compiler warnings git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8176 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4361,7 +4361,6 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
void INVRenderSteeringWheel( UINT32 uiBuffer, UINT32 uiSteeringWheelIndex, SOLDIERTYPE *pSoldier, INT16 sX, INT16 sY, INT16 sWidth, INT16 sHeight, UINT8 fDirtyLevel )
|
||||
{
|
||||
SOLDIERTYPE *pVehicle = NULL;
|
||||
UINT32 usHeight, usWidth;
|
||||
INT16 sNewY, sNewX;
|
||||
|
||||
static CHAR16 pStr[ 100 ], pStr2[ 100 ];
|
||||
@@ -7585,16 +7584,16 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
if ( !Weapon[gpComparedItemDescObject->usItem].NoSemiAuto )
|
||||
{
|
||||
UINT8 ubComparedAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], gpComparedItemDescObject, NULL );
|
||||
if( ubComparedAttackAPs > ubAttackAPs )
|
||||
INT16 sComparedAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], gpComparedItemDescObject, NULL );
|
||||
if ( sComparedAttackAPs > ubAttackAPs )
|
||||
{
|
||||
SetFontForeground( ITEMDESC_FONTNEGATIVE );
|
||||
swprintf( pStr, L"+%2d", ubComparedAttackAPs - ubAttackAPs );
|
||||
swprintf( pStr, L"+%2d", sComparedAttackAPs - ubAttackAPs );
|
||||
}
|
||||
else if( ubComparedAttackAPs < ubAttackAPs )
|
||||
else if ( sComparedAttackAPs < ubAttackAPs )
|
||||
{
|
||||
SetFontForeground( ITEMDESC_FONTPOSITIVE );
|
||||
swprintf( pStr, L"%2d", ubComparedAttackAPs - ubAttackAPs );
|
||||
swprintf( pStr, L"%2d", sComparedAttackAPs - ubAttackAPs );
|
||||
}
|
||||
else
|
||||
swprintf( pStr, L"=");
|
||||
|
||||
Reference in New Issue
Block a user