summaryrefslogtreecommitdiff
path: root/src/ifdef.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>1993-09-17 19:27:09 +0000
committerPaul Eggert <eggert@cs.ucla.edu>1993-09-17 19:27:09 +0000
commit03ca0426698728f388ea7c13bebb4bf7d5aca397 (patch)
tree79164d3c2fb8220389f3cc64533219792dfa1e1e /src/ifdef.c
parenta3866fa3b80f9f78d2b43823411c07ee38592a7a (diff)
downloaddiffutils-03ca0426698728f388ea7c13bebb4bf7d5aca397.tar.gz
GNU diffutils 2.6
Diffstat (limited to 'src/ifdef.c')
-rw-r--r--src/ifdef.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ifdef.c b/src/ifdef.c
index fa20447..4e81ef8 100644
--- a/src/ifdef.c
+++ b/src/ifdef.c
@@ -141,17 +141,19 @@ format_group (out, format, endchar, groups)
for (i = 0; i < 2; i++)
{
- if (isdigit (*f))
+ unsigned char f0 = f[0];
+ if (isdigit (f0))
{
value[i] = atoi (f);
- while (isdigit (*++f))
+ while (isdigit ((unsigned char) *++f))
continue;
}
else
{
- value[i] = groups_letter_value (groups, *f++);
+ value[i] = groups_letter_value (groups, f0);
if (value[i] < 0)
goto bad_format;
+ f++;
}
if (*f++ != "=?"[i])
goto bad_format;