Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 442abe3
Author: SomaZ <17459161+SomaZ@users.noreply.github.com>
Date:   Tue Feb 20 12:02:37 2024 +0100

    [rend2] Fix out-of-bounds crash with weather
  • Loading branch information
SomaZ committed Feb 20, 2024
1 parent a35e31a commit 7be3463
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shared/rd-rend2/tr_weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,11 @@ void RB_SurfaceWeather( srfWeather_t *surf )
{
chunkIndex = (int(centerZoneOffsetX + numMinZonesX) + x + 1) % 3;
chunkIndex += (int(centerZoneOffsetY + numMinZonesY) + y + 1) % 3 * 3;

if (chunkIndex < 0) {
chunkIndex += 9;
}

VectorSet2(
zoneOffsets[chunkIndex],
x,
Expand Down

0 comments on commit 7be3463

Please sign in to comment.