shithub: cstory

Download patch

ref: 053770b81b4b09c0219b6da53c358d6280534c82
parent: 3c920996b80ddbce6a431b862ee6fda2cef71ee5
author: Gabriel Ravier <gabravier@gmail.com>
date: Mon Nov 4 04:50:23 EST 2019

Use "strcmp(a, b) != 0" so it's clearer what we're checking for

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -31,7 +31,7 @@
 	fclose(fp);
 
 	// Check if version is not correct, and return if it failed
-	if (fread_result != 1 || strcmp(conf->proof, config_magic))
+	if (fread_result != 1 || strcmp(conf->proof, config_magic) != 0)
 	{
 		memset(conf, 0, sizeof(CONFIG));
 		return FALSE;