From 31ff24a38fc33e9dc84619e598f2b70528256cc1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 14 Mar 2007 06:39:17 +0000 Subject: [PATCH] Mac Classic platform layer: don't strcmp() a NULL string. --- platform/macclassic.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/platform/macclassic.c b/platform/macclassic.c index d083e37..983f750 100644 --- a/platform/macclassic.c +++ b/platform/macclassic.c @@ -124,15 +124,16 @@ static OSErr oserr(OSErr retval) { char buf[sizeof (ERR_MACOS_GENERIC) + 32]; const char *errstr = get_macos_error_string(retval); - if (strcmp(errstr, ERR_MACOS_GENERIC) == 0) - { - sprintf(buf, ERR_MACOS_GENERIC, (int) retval); - errstr = buf; - } /* if */ - if (errstr != NULL) - __PHYSFS_setError(errstr); + { + if (strcmp(errstr, ERR_MACOS_GENERIC) == 0) + { + sprintf(buf, ERR_MACOS_GENERIC, (int) retval); + errstr = buf; + } /* if */ + __PHYSFS_setError(errstr); + } /* if */ return(retval); } /* oserr */