diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2005-10-31 18:22:40 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2005-10-31 18:22:40 +0000 |
commit | 87f010ec1ab3fdff909370efd9dbca635105471a (patch) | |
tree | 4b5273aa29d42e280e9544d115b2c19c7c99adda /Src/Modules/mathfunc.c | |
parent | 8c3234fb738b56cb8e087681fd8cf82aeac5046b (diff) | |
download | zsh-87f010ec1ab3fdff909370efd9dbca635105471a.tar.gz zsh-87f010ec1ab3fdff909370efd9dbca635105471a.tar.xz zsh-87f010ec1ab3fdff909370efd9dbca635105471a.zip |
Use idigit() instead of range-checking '0' - '9'.
Diffstat (limited to 'Src/Modules/mathfunc.c')
-rw-r--r-- | Src/Modules/mathfunc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Modules/mathfunc.c b/Src/Modules/mathfunc.c index 6b6488abb..7b9b10fab 100644 --- a/Src/Modules/mathfunc.c +++ b/Src/Modules/mathfunc.c @@ -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') |