diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 0158435138c..ab6dd015d13 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -272,7 +272,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size) { void *ret = HeapAlloc(GetProcessHeap(),0,size); if (!ret) - msvcrt_set_errno(GetLastError()); + msvcrt_set_errno(MSVCRT_ENOMEM); return ret; }