shithub: cstory

Download patch

ref: 3c920996b80ddbce6a431b862ee6fda2cef71ee5
parent: 4e322f25c4760774c122c4e7b1662a64d58d5d2d
author: Gabriel Ravier <gabravier@gmail.com>
date: Tue Nov 5 05:43:09 EST 2019

Make memcmp usage clearer

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

--- a/src/Map.cpp
+++ b/src/Map.cpp
@@ -41,7 +41,7 @@
 	char check[3];
 	fread(check, 1, 3, fp);
 
-	if (memcmp(check, code_pxma, 3))
+	if (memcmp(check, code_pxma, 3) != 0)
 	{
 		fclose(fp);
 		return FALSE;