From b1bb4f84e244d141f7f17cdb6497ce645fd56015 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 18 Sep 2019 17:52:07 +0200 Subject: [PATCH] kernelbase: Don't round thread stack guaranteed size when it is zero. Signed-off-by: Alexandre Julliard --- dlls/kernelbase/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index e16062016a9..30e9a2e09bc 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -505,7 +505,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadStackGuarantee( ULONG *size ) ULONG new_size = (*size + 4095) & ~4095; /* at least 2 pages on 64-bit */ - if (sizeof(void *) > sizeof(int)) new_size = max( new_size, 8192 ); + if (sizeof(void *) > sizeof(int) && new_size) new_size = max( new_size, 8192 ); *size = prev_size; if (new_size >= (char *)NtCurrentTeb()->Tib.StackBase - (char *)NtCurrentTeb()->DeallocationStack)