1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

Use idigit() instead of range-checking '0' - '9'.

This commit is contained in:
Wayne Davison 2005-10-31 18:22:40 +00:00
parent 8c3234fb73
commit 87f010ec1a
4 changed files with 8 additions and 9 deletions

View file

@ -503,7 +503,7 @@ math_string(UNUSED(char *name), char *arg, int id)
unsigned short *seedptr = seedbufptr + i;
*seedptr = 0;
for (j = 0; j < 4; j++) {
if (*seedstr >= '0' && *seedstr <= '9')
if (idigit(*seedstr))
*seedptr += *seedstr - '0';
else if (tolower(*seedstr) >= 'a' &&
tolower(*seedstr) <= 'f')