diff --git a/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs b/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs index b93a1ba6e..c1c620d9b 100644 --- a/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs +++ b/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs @@ -128,6 +128,9 @@ public static Image ApplyEncounterColor(IEncounterTemplate enc, Image img, Sprit if (type == SpriteBackgroundType.BottomStripe) { int stripeHeight = SpriteBuilder.ShowEncounterThicknessStripe; // from bottom + if ((uint)stripeHeight > img.Height) // clamp negative & too-high values back to height. + stripeHeight = img.Height; + byte opacity = SpriteBuilder.ShowEncounterOpacityStripe; return ImageUtil.ChangeTransparentTo(img, color, opacity, img.Width * 4 * (img.Height - stripeHeight)); }