diff --git a/magick/xml-tree.c b/magick/xml-tree.c
index f197d39..cd7fb23 100644
--- a/magick/xml-tree.c
+++ b/magick/xml-tree.c
@@ -1767,7 +1767,7 @@
     attributes=(char **) sentinel;
     tag=p;
     if ((isalpha((int) ((unsigned char) *p)) !=0) || (*p == '_') ||
-        (*p == ':') || (*p < '\0'))
+        (*p == ':') || (((int) *p) < '\0'))
       {
         /*
           Tag.