]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/jsmn/example/maptest.c
modified: src/lib/jsmn/example/MAPTEST.EXE
[16.git] / src / lib / jsmn / example / maptest.c
index cdf43779a4c6100b770ca7fcc888afe61286cb9c..ef9c4427a97a6d5a6371f1961e3463136178957d 100644 (file)
@@ -38,9 +38,9 @@ int main() {
        int r;
        jsmn_parser p;
        FILE *fh = fopen("../../../../data/test.map", "r");
-       jsmntok_t t[2048]; /* We expect no more than 128 tokens */
-       char JSON_S[8192];
-       memset(JSON_S, 0, sizeof JSON_S);
+       jsmntok_t t[1536]; /* We expect no more than 128 tokens */
+       char JSON_S[6144];
+       memset(JSON_S, 0, filesize(fh));
 
        if(fh != NULL)
        {