From 6d2e120e77dffb050cdff8e1241a8bd2091a4cc0 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 23 Aug 2023 17:54:09 +0100 Subject: [PATCH] M_DrawCharSelectCircle: Fix offset colour id when number of colors available is odd VS even --- src/k_menudraw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 3681aaeb0..23c989505 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -1299,7 +1299,7 @@ static void M_DrawCharSelectCircle(setup_player_t *p, INT16 x, INT16 y) if (i == 0) { - n = l = r = M_GetColorBefore(&p->colors, p->color, (numoptions/2) - 1); + n = l = r = M_GetColorBefore(&p->colors, p->color, (numoptions/2) - (numoptions & 1)); } else if (subtract) { @@ -1428,7 +1428,7 @@ static void M_DrawCharSelectCircle(setup_player_t *p, INT16 x, INT16 y) if (i == 0) { - n = l = r = M_GetColorBefore(&p->colors, p->followercolor, (numoptions/2) - 1); + n = l = r = M_GetColorBefore(&p->colors, p->followercolor, (numoptions/2) - (numoptions & 1)); } else if (subtract) {