From 1a5bc9d1503f19eefa6b53787f1e7fec43946c30 Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Thu, 5 Feb 2026 20:38:06 +0800 Subject: [PATCH] fix(cherrymp): fix block size check Signed-off-by: sakumisu <1203593632@qq.com> --- third_party/cherrymp/chry_mempool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/cherrymp/chry_mempool.c b/third_party/cherrymp/chry_mempool.c index 0f3f26aa..60da247c 100644 --- a/third_party/cherrymp/chry_mempool.c +++ b/third_party/cherrymp/chry_mempool.c @@ -145,7 +145,7 @@ int chry_mempool_create(struct chry_mempool *pool, void *block, uint32_t block_s return -1; } - if (pool->block_size % 4) { + if (block_size % 4) { return -1; } @@ -176,9 +176,9 @@ int chry_mempool_create(struct chry_mempool *pool, void *block, uint32_t block_s void chry_mempool_delete(struct chry_mempool *pool) { - chry_mempool_osal_sem_delete(pool->out_sem); __chry_ringbuffer_reset(&pool->in); __chry_ringbuffer_reset(&pool->out); + chry_mempool_osal_sem_delete(pool->out_sem); } uintptr_t *chry_mempool_alloc(struct chry_mempool *pool)