summaryrefslogtreecommitdiff
path: root/test/test-api.c
diff options
context:
space:
mode:
authorDaan <daan@microsoft.com>2021-10-19 10:51:17 -0700
committerGitHub <noreply@github.com>2021-10-19 10:51:17 -0700
commit9769cd4103e39eb2f903548bbdd2181adcce3f53 (patch)
tree2dc1853e3ce273a2a485e55bfb7bc3f79f55b2dd /test/test-api.c
parentadeef8d4035c91b34a97fb83acf1c6bde1f1e4c9 (diff)
parentedb0b93c6fdd2edbe4da520c1d632010e91dedcb (diff)
Merge pull request #428 from Logarithmus/fix-test-i686
Fix 'malloc-nomem1' test for 32-bit architectures
Diffstat (limited to 'test/test-api.c')
-rw-r--r--test/test-api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-api.c b/test/test-api.c
index 53e7f3d..55c8043 100644
--- a/test/test-api.c
+++ b/test/test-api.c
@@ -83,7 +83,7 @@ int main(void) {
void* p = mi_malloc(0); mi_free(p);
});
CHECK_BODY("malloc-nomem1",{
- result = (mi_malloc(SIZE_MAX/2) == NULL);
+ result = (mi_malloc((size_t)PTRDIFF_MAX + (size_t)1) == NULL);
});
CHECK_BODY("malloc-null",{
mi_free(NULL);