diff --git a/src/core/mem.c b/src/core/mem.c index 03855484..e5c1ca4b 100644 --- a/src/core/mem.c +++ b/src/core/mem.c @@ -79,7 +79,7 @@ mem_malloc(mem_size_t size) break; } } - if (poolnr == MEMP_MAX) { + if (poolnr > MEMP_POOL_LAST) { LWIP_ASSERT("mem_malloc(): no pool is that big!", 0); return NULL; }