You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/09/12 12:08:54 UTC

[incubator-nuttx-apps] branch master updated: examples/wgetjson: fix concatenation len buffer json

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new b11dcc3  examples/wgetjson: fix concatenation len buffer json
b11dcc3 is described below

commit b11dcc34c6bf1f44a1a2cd613fbfd6c30bd1f997
Author: Vagner Guadagnin <gu...@gmail.com>
AuthorDate: Sat Sep 11 20:58:50 2021 -0300

    examples/wgetjson: fix concatenation len buffer json
---
 examples/wgetjson/wgetjson_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/wgetjson/wgetjson_main.c b/examples/wgetjson/wgetjson_main.c
index d2eb90a..9d60a8b 100644
--- a/examples/wgetjson/wgetjson_main.c
+++ b/examples/wgetjson/wgetjson_main.c
@@ -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;