From 66489f900ec9b6f1bcaed309451bb4e0dcf1f86a Mon Sep 17 00:00:00 2001 From: Arthur <spaddlewit@gmail.com> Date: Fri, 16 Feb 2024 19:18:36 -0500 Subject: [PATCH] More cleanup --- src/f_finale.c | 2 +- src/v_video.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index a86ce53c73..9b85618753 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1313,7 +1313,7 @@ void F_CreditDrawer(void) break; case 1: { - INT32 height = V_CreditStringHeight(&credits[i][1], 0) * vid.dup; + INT32 height = V_CreditStringHeight(&credits[i][1]) * vid.dup; height <<= FRACBITS; if (y > -height) V_DrawCreditString((160 - (V_CreditStringWidth(&credits[i][1]) >> 1)) << FRACBITS, y, 0, &credits[i][1]); diff --git a/src/v_video.c b/src/v_video.c index 4ec3f49e49..5c9724ee90 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -3232,7 +3232,7 @@ INT32 V_CreditStringHeight(const char *string) // It's possible for string to be a null pointer if (!string) - return; + return 0; for (;;) { @@ -3452,6 +3452,9 @@ INT32 V_StringHeight(const char *string, INT32 option) const char *ch = string; INT32 spacewidth = 4, charwidth = 0; + if (!string) + return 0; + INT32 lowercase = (option & V_ALLOWLOWERCASE); option &= ~V_FLIP; // which is also shared with V_ALLOWLOWERCASE... -- GitLab