() Bostjan Vilfan <[email protected]> () Mon, 25 Mar 2013 06:19:13 +0100
In the previous mail I forgot to add that I also tested rcs, version 5.8.1, on Ubuntu Linux, with the same ,v file, and obtained the same result. Therefore, it probably is a bug. Yes, confirmed. Thanks for reporting it. Thanks also to Paul Eggert for noting the nature (regression). Here's a patch:
src/rcsrev.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/rcsrev.c b/src/rcsrev.c
index c9453e0..15d3605 100644
--- a/src/rcsrev.c
+++ b/src/rcsrev.c
@@ -595,7 +595,8 @@ rev_from_symbol (struct cbuf const *id)
{
struct symdef const *d = ls->entry;
- if (!strncmp (d->meaningful, id->string, id->size))
+ if ('\0' == d->meaningful[id->size]
+ && !strncmp (d->meaningful, id->string, id->size))
return d->underlying;
}
return NULL;
Does this fix work for you? -- Thien-Thi Nguyen GPG key: 4C807502
pgpjcSCwNJfX9.pgp
Description: PGP signature
