summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2026-02-05 20:38:06 +0800
committersakumisu <[email protected]>2026-02-05 20:38:06 +0800
commit1a5bc9d1503f19eefa6b53787f1e7fec43946c30 (patch)
tree2f81dfe9a86135c1e01d307bac775cdc232c6c46
parent08d1ce4ab5a825a6b93add7dfd83b5b86d8e151b (diff)
fix(cherrymp): fix block size check
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--third_party/cherrymp/chry_mempool.c4
1 files 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)