diff --git a/source/client/src/clientSmlJson.c b/source/client/src/clientSmlJson.c index 9ed1d83338..228f8d40f3 100644 --- a/source/client/src/clientSmlJson.c +++ b/source/client/src/clientSmlJson.c @@ -256,7 +256,7 @@ int smlJsonParseObjFirst(char **start, SSmlLineInfo *element, int8_t *offset){ if(unlikely(index >= OTD_JSON_FIELDS_NUM)) { uError("index >= %d, %s", OTD_JSON_FIELDS_NUM, *start) - break; + return -1; } char *sTmp = *start; @@ -385,7 +385,7 @@ int smlJsonParseObj(char **start, SSmlLineInfo *element, int8_t *offset){ if(unlikely(index >= OTD_JSON_FIELDS_NUM)) { uError("index >= %d, %s", OTD_JSON_FIELDS_NUM, *start) - break; + return -1; } if((*start)[1] == 'm'){