[PATCH 0/1] MR6500: include: Define NULL as 0LL in C++ on 64bit archs.
Fixes incorrect value size being pushed to the stack when NULL is used as a sentinel in a varargs function. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6500
From: Rémi Bernon <rbernon(a)codeweavers.com> Fixes incorrect value size being pushed to the stack when NULL is used as a sentinel in a varargs function. --- include/msvcrt/corecrt.h | 6 +++++- include/windef.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 945d8ac4055..d2e8482a44b 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -76,7 +76,11 @@ #ifndef NULL #ifdef __cplusplus -#define NULL 0 +#ifndef _WIN64 +#define NULL 0 +#else +#define NULL 0LL +#endif #else #define NULL ((void *)0) #endif diff --git a/include/windef.h b/include/windef.h index 79a96791151..f8438f82c83 100644 --- a/include/windef.h +++ b/include/windef.h @@ -186,7 +186,11 @@ extern "C" { #undef NULL #ifdef __cplusplus -#define NULL 0 +#ifndef _WIN64 +#define NULL 0 +#else +#define NULL 0LL +#endif #else #define NULL ((void*)0) #endif -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6500
participants (1)
-
Rémi Bernon