diff --git a/src/common/2d/v_draw.cpp b/src/common/2d/v_draw.cpp index fbf28a0b002..55521e78b18 100644 --- a/src/common/2d/v_draw.cpp +++ b/src/common/2d/v_draw.cpp @@ -1624,4 +1624,4 @@ DEFINE_ACTION_FUNCTION(_Screen, SetOffset) PARAM_FLOAT(x); PARAM_FLOAT(y); ACTION_RETURN_VEC2(twod->SetOffset(DVector2(x, y))); -} +} \ No newline at end of file diff --git a/src/playsim/p_effect.cpp b/src/playsim/p_effect.cpp index 000cc0fee37..23a541ba65d 100644 --- a/src/playsim/p_effect.cpp +++ b/src/playsim/p_effect.cpp @@ -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)