From 7493db2338a669261ed82cce834446b4c3b08bd5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 3 Dec 2001 12:57:45 +0000 Subject: Eric nailed a but in strnequal() for macintosh --- lib/strequal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/strequal.c') diff --git a/lib/strequal.c b/lib/strequal.c index 6859e26bd..df5d4f14b 100644 --- a/lib/strequal.c +++ b/lib/strequal.c @@ -63,6 +63,9 @@ int curl_strnequal(const char *first, const char *second, size_t max) first++; second++; } + if(0 == max) + return 1; /* they are equal this far */ + return toupper(*first) == toupper(*second); #endif } -- cgit v1.2.3