From 02219b26de5ae6d5a405e7b08b37adb5f3c7ff98 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 9 Jun 2018 16:26:07 +0200 Subject: [PATCH] Fix json parsing from string --- src/blupi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blupi.cxx b/src/blupi.cxx index 9ec9fb9..78e3f64 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -122,7 +122,7 @@ ReadConfig () Sint64 size = SDL_RWsize (file); char * buffer = (char *) calloc (sizeof (char), size + 1); SDL_RWread (file, buffer, size, 1); - nlohmann::json j = buffer; + nlohmann::json j = nlohmann::json::parse (buffer); SDL_RWclose (file); free (buffer);