X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/69517d70a43539579b0a99ae1181e4137383041f..c0601d1e22c5c3749ea94c1c4359f9223b732fe4:/src/tools.c diff --git a/src/tools.c b/src/tools.c index 3dd81b7..357c1c7 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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);