Skip to content

Commit

Permalink
- validate fountaincolor before using it.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jun 21, 2022
1 parent 3213f04 commit d5888df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/2d/v_draw.cpp
Expand Up @@ -1624,4 +1624,4 @@ DEFINE_ACTION_FUNCTION(_Screen, SetOffset)
PARAM_FLOAT(x);
PARAM_FLOAT(y);
ACTION_RETURN_VEC2(twod->SetOffset(DVector2(x, y)));
}
}
1 change: 1 addition & 0 deletions src/playsim/p_effect.cpp
Expand Up @@ -440,6 +440,7 @@ void P_RunEffect (AActor *actor, int effects)
&grey4, &white
};
int color = actor->fountaincolor*2;
if (color < 0 || color >= 16) color = 0;
MakeFountain (actor, *fountainColors[color], *fountainColors[color+1]);
}
if (effects & FX_RESPAWNINVUL)
Expand Down

0 comments on commit d5888df

Please sign in to comment.