changed buffer for versions.json to correct size
it was set to 256 and guess what? the current versions.json is EXACTLY 256 characters long lmaoo
This commit is contained in:
parent
7f90c74124
commit
a1503d6b74
@ -51,12 +51,20 @@ void checkVersion(inputFlags flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//JSON VARIABLES
|
//JSON VARIABLES
|
||||||
fileBuffer = fopen(VERSIONS_NAME, "r");
|
char *buffer;
|
||||||
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;
|
||||||
|
|
||||||
|
//COUNT LENGTH OF buffer
|
||||||
|
fileBuffer = fopen(VERSIONS_NAME, "r");
|
||||||
|
fseek(fileBuffer, 0, SEEK_END);
|
||||||
|
buffer = malloc(sizeof(char) * ftell(fileBuffer));
|
||||||
|
fclose(fileBuffer);
|
||||||
|
|
||||||
|
//SET fileBuffer
|
||||||
|
fileBuffer = fopen(VERSIONS_NAME, "r"); //TODO: Find some realloc or something, dumbass
|
||||||
|
|
||||||
//FIX buffer
|
//FIX buffer
|
||||||
strcpy(buffer, "");
|
strcpy(buffer, "");
|
||||||
|
|
||||||
@ -125,6 +133,7 @@ void checkVersion(inputFlags flags)
|
|||||||
//DEALLOCATION
|
//DEALLOCATION
|
||||||
free(parsedJson);
|
free(parsedJson);
|
||||||
free(active);
|
free(active);
|
||||||
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
|
void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user