From dad432566a5c74f86dc4ba874e631115e0f469d1 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Wed, 24 Feb 2021 18:01:08 +0100 Subject: level selector and fx fic --- json/jsonparse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'json') diff --git a/json/jsonparse.c b/json/jsonparse.c index 9ac845c..4b5096c 100644 --- a/json/jsonparse.c +++ b/json/jsonparse.c @@ -15,11 +15,11 @@ void json_parse_array(char *json, void *temp, jsmntok_t *t, int r, char type) { if (t[i].type == JSMN_PRIMITIVE) { char val[32]; substr_token(json, val, t+i); if (type == 'i') { - int *p = (int*)(intptr_t)temp+sizeof(int)*i; + int *p = (int*)(intptr_t)temp+i; *p = atoi(val); } if (type == 'c') { - int8_t *p = (int8_t*)(intptr_t)temp+sizeof(int8_t)*i; + int8_t *p = (int8_t*)(intptr_t)temp+i; *p = atoi(val); } if (type == 'f') { @@ -35,7 +35,7 @@ void json_dump_array (char *str, void *arr, int len, char type) { sprintf(str+cur, "[ "); cur = strlen(str); for (int i=0; i