diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-03-06 12:12:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-03-06 12:12:02 (GMT) |
commit | 2b6727bd8a714d334d34e6a9fabc1d0f651633a7 (patch) | |
tree | 7069489f11699b9626602340b84ec0db48cced03 /Python | |
parent | a30c1001ef4fe6bceda269c4e7d7b06e929ccec0 (diff) | |
download | cpython-2b6727bd8a714d334d34e6a9fabc1d0f651633a7.zip cpython-2b6727bd8a714d334d34e6a9fabc1d0f651633a7.tar.gz cpython-2b6727bd8a714d334d34e6a9fabc1d0f651633a7.tar.bz2 |
Use Py_CHARMASK for ctype macros. Fixes bug #232787.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/errors.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c index 7f30f7e..8d02b8e 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -402,7 +402,7 @@ PyErr_Format(PyObject *exception, const char *format, ...) for (f = format; *f; f++) { if (*f == '%') { const char* p = f; - while (*++f && *f != '%' && !isalpha(*f)) + while (*++f && *f != '%' && !isalpha(Py_CHARMASK(*f))) ; switch (*f) { case 'c': @@ -457,15 +457,15 @@ PyErr_Format(PyObject *exception, const char *format, ...) /* parse the width.precision part (we're only interested in the precision value, if any) */ n = 0; - while (isdigit(*f)) + while (isdigit(Py_CHARMASK(*f))) n = (n*10) + *f++ - '0'; if (*f == '.') { f++; n = 0; - while (isdigit(*f)) + while (isdigit(Py_CHARMASK(*f))) n = (n*10) + *f++ - '0'; } - while (*f && *f != '%' && !isalpha(*f)) + while (*f && *f != '%' && !isalpha(Py_CHARMASK(*f))) f++; switch (*f) { case 'c': |