kernelbase: Don't round thread stack guaranteed size when it is zero.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-09-18 17:52:07 +02:00
parent 7ee66b29cb
commit b1bb4f84e2
1 changed files with 1 additions and 1 deletions

View File

@ -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)