summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/z-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/z-util.c b/src/z-util.c
index 76120833..7c5374f3 100644
--- a/src/z-util.c
+++ b/src/z-util.c
@@ -127,6 +127,9 @@ bool_ func_false(void)
*/
bool_ streq(cptr a, cptr b)
{
+ if ((a == NULL) && (b == NULL)) { return TRUE; }
+ if (a == NULL) { return FALSE; }
+ if (b == NULL) { return FALSE; }
return (!strcmp(a, b));
}