From 40adce2e27bb87df1362fbfa7e9dbcaa6111cb71 Mon Sep 17 00:00:00 2001 From: QinPan Date: Thu, 28 Mar 2019 22:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=20jsonPairMalloc,=20json?= =?UTF-8?q?ObjectMalloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- new_protocol/json_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new_protocol/json_utils.c b/new_protocol/json_utils.c index 15b6a55..44e7167 100644 --- a/new_protocol/json_utils.c +++ b/new_protocol/json_utils.c @@ -19,7 +19,7 @@ JsonPair *jsonPairMalloc(){ structureMemCnt += size; if(structureMemCnt > MEM_SIZE_STRUCTURE) return NULL; - structureCurrPtr = structureCurrPtr + structureMemCnt; + structureCurrPtr = structureCurrPtr + size; return (JsonPair *)ptr; } @@ -31,7 +31,7 @@ JsonObject *jsonObjectMalloc(){ structureMemCnt += size; if(structureMemCnt > MEM_SIZE_STRUCTURE) return NULL; - structureCurrPtr = structureCurrPtr + structureMemCnt; + structureCurrPtr = structureCurrPtr + size; return (JsonObject *)ptr; } -- Gitee