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

This commit is contained in:
Piotr Caban 2012-12-19 10:16:45 +01:00 committed by Alexandre Julliard
parent 140bfd2823
commit 7771552f24

View file

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