From e6d0b5ae0e49b86030f2ff285c1f48406972175b Mon Sep 17 00:00:00 2001 From: NorthFury Date: Sat, 27 May 2023 16:56:27 +0200 Subject: [PATCH] fix tooltip scaling when winfonts are enabled --- Standard Gaming Platform/WinFont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Standard Gaming Platform/WinFont.cpp b/Standard Gaming Platform/WinFont.cpp index aa97f278..cb60ab16 100644 --- a/Standard Gaming Platform/WinFont.cpp +++ b/Standard Gaming Platform/WinFont.cpp @@ -43,7 +43,7 @@ typedef struct } HWINFONT; LONG gWinFontAdjust; -HWINFONT WinFonts[WIN_LASTFONT]; +HWINFONT WinFonts[WIN_LASTFONT + 2]; // extra space for the tooltip fonts INT32 WinFontMap[MAX_WINFONTMAP]; @@ -327,7 +327,7 @@ INT32 FindFreeWinFont( void ) HWINFONT *GetWinFont( INT32 iFont ) { - if ( iFont == -1 || iFont >=WIN_LASTFONT) + if (iFont == -1 || iFont >= sizeof(WinFonts) ) { return( NULL ); }