the entire match case sensitive, only lower case characters.
-/* $OpenBSD: magic-test.c,v 1.3 2015/04/25 16:35:47 brynet Exp $ */
+/* $OpenBSD: magic-test.c,v 1.4 2015/05/29 14:52:10 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
{
if (a == b)
return (1);
- if (cflag && tolower((u_char)a) == tolower((u_char)b))
+ if (cflag && islower((u_char)b) && tolower((u_char)a) == (u_char)b)
return (1);
return (0);
}