fixed checkVersion problem(s)

this was caused to invalid buffer
This commit is contained in:
Václav Šmejkal 2022-05-12 18:42:17 +02:00
parent 3c536f22a8
commit 60f0ef807e

View File

@ -52,11 +52,14 @@ void checkVersion(inputFlags flags)
//JSON VARIABLES //JSON VARIABLES
fileBuffer = fopen(VERSIONS_NAME, "r"); fileBuffer = fopen(VERSIONS_NAME, "r");
char buffer[256]; char buffer[512];
char lineBuffer[64]; char lineBuffer[64];
struct json_object *parsedJson; struct json_object *parsedJson;
struct json_object *active; struct json_object *active;
//FIX buffer
strcpy(buffer, "");
//LOAD jsonFile //LOAD jsonFile
while (fgets(lineBuffer, sizeof(lineBuffer), fileBuffer) != NULL) while (fgets(lineBuffer, sizeof(lineBuffer), fileBuffer) != NULL)
{ {