瀏覽代碼

Readme: Fix #143 item->name --> item->string

Max Bruckner 8 年之前
父節點
當前提交
ab8489a851
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      README.md

+ 2 - 2
README.md

@@ -240,8 +240,8 @@ void parse_and_callback(cJSON *item, const char *prefix)
 {
     while (item)
     {
-        char *newprefix = malloc(strlen(prefix) + strlen(item->name) + 2);
-        sprintf(newprefix, "%s/%s", prefix, item->name);
+        char *newprefix = malloc(strlen(prefix) + strlen(item->string) + 2);
+        sprintf(newprefix, "%s/%s", prefix, item->string);
         int dorecurse = callback(newprefix, item->type, item);
         if (item->child && dorecurse)
         {