[WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.

wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban <piotr@codeweavers.com>
This commit is contained in:
Timo Kreuzer 2023-01-10 11:50:18 +02:00
parent 739c9a1e77
commit f34e425e1a

View file

@ -545,7 +545,7 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment,
} }
/* offset must be less than size */ /* offset must be less than size */
if (offset >= size) if (offset && offset >= size)
{ {
*MSVCRT__errno() = MSVCRT_EINVAL; *MSVCRT__errno() = MSVCRT_EINVAL;
return NULL; return NULL;