diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-30 18:17:01 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-30 18:17:01 +0000 |
commit | 517cafe04b649dbfbd9a5bb25d21aa705ca15207 (patch) | |
tree | b8772e477e9c8676b2ea4bb944ba9d39096149ed /gnu | |
parent | e426eeb70603608c783eedcfd1fa2e34ce32ac14 (diff) |
Fixed version of Matthieu's change from revision 1.12
OK matthieu@ && deraadt@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/cvs/src/rcs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index 0ffe73f0658..3719e5561a5 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -3546,13 +3546,15 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) srch_len -= (srch_next + 1) - srch; srch = srch_next + 1; - /* Look for the first non alphabetic character after the '$'. */ + /* Look for the first non alphanumeric character after the '$'. */ send = srch + srch_len; - for (s = srch; s < send; s++) - if (! isalpha ((unsigned char) *s)) + if (! isalpha((unsigned char) *srch)) + continue; /* first character of a tag must be a letter */ + for (s = srch+1; s < send; s++) + if (! isalnum ((unsigned char) *s)) break; - /* If the first non alphabetic character is not '$' or ':', + /* If the first non alphanumeric character is not '$' or ':', then this is not an RCS keyword. */ if (s == send || (*s != '$' && *s != ':')) continue; |