1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-27 15:01:00 +01:00

50049: care with signed characters

Some signed-to-unsigned casts needed for a couple of cases of pointers
used as indices.
This commit is contained in:
Peter Stephenson 2022-04-12 14:10:08 +01:00
parent 09ad15b986
commit c5a891a29d
3 changed files with 8 additions and 2 deletions

View file

@ -1666,7 +1666,7 @@ match_colour(const char **teststrp, int is_fg, int colour)
tc = TCBGCOLOUR;
}
if (teststrp) {
if (**teststrp == '#' && isxdigit((*teststrp)[1])) {
if (**teststrp == '#' && isxdigit(STOUC((*teststrp)[1]))) {
struct color_rgb color;
char *end;
zlong col = zstrtol(*teststrp+1, &end, 16);