made cleaning buffer in version check smarter

I think my IQ raised

by -10
This commit is contained in:
Václav Šmejkal 2022-12-11 16:32:36 +01:00
parent 403cb396b6
commit ab9b46e75a
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -140,7 +140,7 @@ boolean checkVersion(void)
buffer = malloc(bufferSize + 1); buffer = malloc(bufferSize + 1);
//FIX buffer //FIX buffer
strcpy(buffer, ""); memset(buffer, '\0', bufferSize);
//LOAD jsonFile //LOAD jsonFile
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value (void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value