diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 2096a67961a6ce15aa56671f75d5641330ba768a
parent db78609f0232098e966c0334988989e965a9274b
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Mon, 17 May 2021 09:25:28 +0200

fix strtok bug in extract_json_value

Diffstat:
Mutils.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils.c b/utils.c @@ -5,7 +5,7 @@ char* extract_json_value(char* json, char* key, bool quoted) { char* tok = (char *) malloc(strlen(json) * sizeof(char)); strcpy(tok, json); - tok = strtok(json, " "); + tok = strtok(tok, " "); while (tok != NULL) { if (strstr(tok, key) != NULL) { tok = strtok(NULL, " "); // value