From 2949495c76480e6ee1124517b68d945b6091e97e Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 9 Jun 2023 14:32:07 +0100 Subject: [PATCH] K_drawButton: Explicitly convert boolean inputs to numerical index, instead of assuming false is 0 and true is 1 --- src/k_hud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_hud.c b/src/k_hud.c index 995877f8d..f958ff6c9 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -4849,7 +4849,7 @@ K_drawMiniPing (void) void K_drawButton(fixed_t x, fixed_t y, INT32 flags, patch_t *button[2], boolean pressed) { - V_DrawFixedPatch(x, y, FRACUNIT, flags, button[pressed], NULL); + V_DrawFixedPatch(x, y, FRACUNIT, flags, button[(pressed == true) ? 1 : 0], NULL); } void K_drawButtonAnim(INT32 x, INT32 y, INT32 flags, patch_t *button[2], tic_t animtic)