Ver código fonte

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

Max Bruckner 8 anos atrás
pai
commit
ab8489a851
1 arquivos alterados com 2 adições e 2 exclusões
  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)
         {