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>
This commit is contained in:
Gabriel Ravier 2019-11-05 17:16:20 +01:00
parent 053770b81b
commit f96b7fa566
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ BOOL LoadEvent(const char *path_event)
// 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

View file

@ -104,7 +104,7 @@ BOOL LoadProfile(const char *name)
// 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