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:
parent
053770b81b
commit
f96b7fa566
2 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ BOOL LoadEvent(const char *path_event)
|
||||||
// Read "PXE" check
|
// Read "PXE" check
|
||||||
char code[4];
|
char code[4];
|
||||||
fread(code, 1, 4, fp);
|
fread(code, 1, 4, fp);
|
||||||
if (memcmp(code, gPassPixEve, 3))
|
if (memcmp(code, gPassPixEve, 3) != 0)
|
||||||
{
|
{
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
// The original game forgot to close the file here
|
// The original game forgot to close the file here
|
||||||
|
|
|
@ -104,7 +104,7 @@ BOOL LoadProfile(const char *name)
|
||||||
|
|
||||||
// Check header code
|
// Check header code
|
||||||
fread(profile.code, 8, 1, fp);
|
fread(profile.code, 8, 1, fp);
|
||||||
if (memcmp(profile.code, gProfileCode, 8))
|
if (memcmp(profile.code, gProfileCode, 8) != 0)
|
||||||
{
|
{
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
fclose(fp); // The original game forgets to close the file
|
fclose(fp); // The original game forgets to close the file
|
||||||
|
|
Loading…
Add table
Reference in a new issue