This is a minor portability fix - isdigit() (and friends) are only portably defined for unsigned char values (though glibc extends them to work for signed char too) so this fixes this code to handle top bit set characters on non-glibc platforms where char is signed by default.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ee474ece0e
commit
5b8ca942ad
1 changed files with 1 additions and 1 deletions
|
|
@ -1165,7 +1165,7 @@ String *replace_captures(const char *input, String *subst, int captures[])
|
|||
/* Handle substitution */
|
||||
if (*p == '\0') {
|
||||
Putc('\\', result);
|
||||
} else if (isdigit((int)*p)) {
|
||||
} else if (isdigit((unsigned char)*p)) {
|
||||
int group = *p++ - '0';
|
||||
int l = captures[group*2], r = captures[group*2 + 1];
|
||||
if (l != -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue