mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Fix: crash when clicking on empty inventory slot
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8459 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1646,6 +1646,13 @@ void POPUP::DetermineBoxPositions( void )
|
||||
return;
|
||||
}
|
||||
|
||||
// Flugente: fix obvious errors
|
||||
pPoint.iX = max( pPoint.iX, 0 );
|
||||
pPoint.iX = min( pPoint.iX, SCREEN_WIDTH );
|
||||
|
||||
pPoint.iY = max( pPoint.iY, 0 );
|
||||
pPoint.iY = min( pPoint.iY, SCREEN_HEIGHT );
|
||||
|
||||
// set all the other positions to match this one
|
||||
this->Position = pPoint;
|
||||
this->BoxesX = pPoint.iX;
|
||||
|
||||
Reference in New Issue
Block a user