From cffdd22b8560d0d48b12a6ece2dc4dc76059c827 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 25 May 2022 17:18:39 +0200 Subject: [PATCH] found some better way to rewind FILE in version checking just removing that TODO --- src/lib/misc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/misc.c b/src/lib/misc.c index d332758..16c2b7e 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -60,10 +60,8 @@ void checkVersion(inputFlags flags) fileBuffer = fopen(VERSIONS_NAME, "r"); fseek(fileBuffer, 0, SEEK_END); buffer = malloc(ftell(fileBuffer)); - fclose(fileBuffer); - - //SET fileBuffer - fileBuffer = fopen(VERSIONS_NAME, "r"); //TODO: Find some realloc or something, dumbass + + rewind(fileBuffer); //REWIND fileBuffer (NO SHIT) //FIX buffer strcpy(buffer, "");