]> jfr.im git - solanum.git/blobdiff - src/supported.c
Ensure consistent indexing into user_modes independent on signedness of char.
[solanum.git] / src / supported.c
index 24c1e3ed5fb84882baa69eec92aadc5282c3857e..8133d548c598a8304143ff128d6ed83aeb01cceb 100644 (file)
@@ -230,7 +230,8 @@ isupport_umode(const void *ptr)
        const char *str;
 
        str = ptr;
-       return ConfigFileEntry.oper_only_umodes & user_modes[*str] ? NULL : str;
+       return ConfigFileEntry.oper_only_umodes &
+               user_modes[(unsigned char)*str] ? NULL : str;
 }
 
 static const char *