ref: f96b7fa56607e73e80019c031a7095b9d02f9463
parent: 053770b81b4b09c0219b6da53c358d6280534c82
author: Gabriel Ravier <gabravier@gmail.com>
date: Tue Nov 5 12:16:20 EST 2019
Use "memcmp(a, b) != 0" instead of "memcmp(a, b)" so it's clearer we're searching for a difference Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
--- a/src/NpChar.cpp
+++ b/src/NpChar.cpp
@@ -68,7 +68,7 @@
// Read "PXE" check
char code[4];
fread(code, 1, 4, fp);
- if (memcmp(code, gPassPixEve, 3))
+ if (memcmp(code, gPassPixEve, 3) != 0)
{
#ifdef FIX_BUGS
// The original game forgot to close the file here
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -104,7 +104,7 @@
// Check header code
fread(profile.code, 8, 1, fp);
- if (memcmp(profile.code, gProfileCode, 8))
+ if (memcmp(profile.code, gProfileCode, 8) != 0)
{
#ifdef FIX_BUGS
fclose(fp); // The original game forgets to close the file