diff --git a/src/NpChar.cpp b/src/NpChar.cpp index 9e50f2b3..589eab8b 100644 --- a/src/NpChar.cpp +++ b/src/NpChar.cpp @@ -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 diff --git a/src/Profile.cpp b/src/Profile.cpp index 0f0cb37f..f9dc051c 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -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