]> git.kaiwu.me - klib.git/commitdiff
missing include
authorHeng Li <lh3@me.com>
Sun, 30 Nov 2014 03:13:15 +0000 (22:13 -0500)
committerHeng Li <lh3@me.com>
Sun, 30 Nov 2014 03:13:15 +0000 (22:13 -0500)
kson.c
kson.h

diff --git a/kson.c b/kson.c
index 98ee974d1d73659dcf4ea71bb20d6f690350ac20..c6c71445f2032f9fb0af65b97629dc78c88e6318 100644 (file)
--- a/kson.c
+++ b/kson.c
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
                        } else printf("Error code: %d\n", error);
                }
        } else {
-               kson = kson_parse("{'a' : 1,'b':[0,'isn\\'t',true],'d':[{\n}]}", &error);
+               kson = kson_parse("{'a' : 1,'b':[0,'isn\\'t',true],'d':[{\n\n\n}]}", &error);
                if (error == 0) {
                        const kson_node_t *p = kson_query(kson->nodes, 2, "b", 1);
                        if (p) printf("*** %s\n", p->v.str);
diff --git a/kson.h b/kson.h
index e31f5fe81d6374c78e81621b4164e4dabfdf6591..577e80aabf5c8325ae1d244ba9ea35f8bbf48a1a 100644 (file)
--- a/kson.h
+++ b/kson.h
@@ -1,6 +1,8 @@
 #ifndef KSON_H
 #define KSON_H
 
+#include <string.h>
+
 #define KSON_TYPE_NO_QUOTE  1
 #define KSON_TYPE_SGL_QUOTE 2
 #define KSON_TYPE_DBL_QUOTE 3