From 7d6f6ca93ab0d1f6eeb0da5c665bacaf78a53b8f Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Tue, 21 Jul 2026 19:37:34 -0700 Subject: [PATCH] fix gdi text on mingw --- src/text/gdi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/text/gdi.c b/src/text/gdi.c index b764353..ab54664 100644 --- a/src/text/gdi.c +++ b/src/text/gdi.c @@ -180,19 +180,19 @@ static HANDLE WINAPI _AddFontMemResourceExPolyFill(PVOID pFileView, DWORD cjSize CHAR temp_path_dir[MAX_PATH]; CHAR temp_path_name[MAX_PATH]; HANDLE tempFile = NULL; - int hr; + DWORD hr; (void)pvResrved; hr = GetTempPathA(MAX_PATH, temp_path_dir); if(hr == 0) { printf("GetTempPathA error %08lX\n", hr); - return hr; + return NULL; } hr = GetTempFileNameA(temp_path_dir, TEXT("MILSKO"), 0, temp_path_name); if(hr == 0) { printf("GetTempFileNameA error %08lX\n", hr); - return hr; + return NULL; } printf("extracting mem font to %s\n", temp_path_name); @@ -223,14 +223,14 @@ static HANDLE WINAPI _AddFontMemResourceExPolyFill(PVOID pFileView, DWORD cjSize } } printf("CreateFileA error %08lX\n", err); - return hr; + return NULL; } success: hr = WriteFile(tempFile, pFileView, cjSize, NULL, NULL); if(hr != 0) { printf("WriteFile error %08lX\n", hr); - return 0; + return NULL; } *pNumFonts = AddFontResource(temp_path_name);