mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: illegal array access if resolution exceeds monitor resolution
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8822 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -423,6 +423,12 @@ void RemoveCoverObjectsFromViewArea()
|
||||
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
|
||||
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
|
||||
|
||||
// Flugente: hey, wouldn't it be cool if we DIDN'T access an array with implausible values?
|
||||
gsMinCellX = max( 0, gsMinCellX );
|
||||
gsMaxCellX = min( COVER_X_CELLS, gsMaxCellX );
|
||||
gsMinCellY = max( 0, gsMinCellY );
|
||||
gsMaxCellY = min( COVER_Y_CELLS, gsMaxCellY );
|
||||
|
||||
register INT32 ubX, ubY, ubZ;
|
||||
BOOLEAN fChanged = FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user