https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f22efba486eb8ad5811ad…
commit f22efba486eb8ad5811ad5abc7b2e42c0ae80330
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Jan 23 21:03:11 2025 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Jan 23 21:03:26 2025 +0100
[WIN32SS:NTGDI] freetype.c: Use the correct last-error functions.
EngSetLastError() is for Win32 errors; SetLastNtError() is for NTSTATUS.
---
win32ss/gdi/ntgdi/freetype.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index dd153ff3185..83c024a4c94 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -5284,7 +5284,7 @@ ftGdiGetTextMetricsW(
if (!ptmwi)
{
- EngSetLastError(STATUS_INVALID_PARAMETER);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
RtlZeroMemory(ptmwi, sizeof(TMW_INTERNAL));
@@ -7528,7 +7528,7 @@ NtGdiGetCharABCWidthsW(
if(Safepwch)
ExFreePoolWithTag(Safepwch , GDITAG_TEXT);
- EngSetLastError(Status);
+ SetLastNtError(Status);
return FALSE;
}
@@ -7721,7 +7721,7 @@ NtGdiGetCharWidthW(
if (!NT_SUCCESS(Status))
{
- EngSetLastError(Status);
+ SetLastNtError(Status);
return FALSE;
}