]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/tools.c
Fix for a couple of crash bugs
[irc/evilnet/x3.git] / src / tools.c
index 3dd81b787e2936fedc300f353999c9cbcb8cd88e..357c1c7c3f6eb35a6c66d4957988947115c932f6 100644 (file)
@@ -367,6 +367,10 @@ irc_strtolower(char *str) {
 
 int
 irccasecmp(const char *stra, const char *strb) {
+    if (!stra)
+      return -1;
+    if (!strb)
+      return 1;
     while (*stra && (tolower(*stra) == tolower(*strb)))
         stra++, strb++;
     return tolower(*stra) - tolower(*strb);