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:
parent
8c3234fb73
commit
87f010ec1a
4 changed files with 8 additions and 9 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue