fix tooltip scaling when winfonts are enabled

This commit is contained in:
NorthFury
2023-05-27 21:52:35 -03:00
committed by majcosta
parent 456cfa18cf
commit e6d0b5ae0e
+2 -2
View File
@@ -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 );
}