examples/wgetjson: fix concatenation len buffer json

This commit is contained in:
Vagner Guadagnin 2021-09-11 20:58:50 -03:00 committed by Alan Carvalho de Assis
parent 5c1626c764
commit b11dcc34c6

View File

@ -148,7 +148,7 @@ static int wgetjson_callback(FAR char **buffer, int offset, int datend,
if (new_json_buff)
{
g_json_buff = new_json_buff;
memcpy(&g_json_buff[g_json_bufflen - 1], &((*buffer)[offset]),
memcpy(&g_json_buff[g_json_bufflen], &((*buffer)[offset]),
len);
g_json_buff[g_json_bufflen + len] = 0;
g_json_bufflen += org;