From c296cef100e8bbe39fff1f7a4316ecbe961787d7 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Sat, 30 Nov 2024 09:57:52 +0300 Subject: Fix strieq Thanks @neirokan for helping with this --- src/header.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/header.c') diff --git a/src/header.c b/src/header.c index f3072ad..29e87f7 100644 --- a/src/header.c +++ b/src/header.c @@ -59,10 +59,8 @@ static int strieq(const char *a, const char *b) { - while (*a) - if (tolower(*a) != tolower(*b)) - return 0; - return 1; + while (*a && tolower(*a) == tolower(*b)) ++a, ++b; + return tolower(*a) == tolower(*b); } #define CHECK() \ -- cgit 1.4.1