Re: Wrong revision is retrieved
Thien-Thi Nguyen <[email protected]> Tue, 02 Apr 2013 19:07:08 +0200
| Newsgroups | gmane.comp.gnu.rcs |
|---|---|
| Message-ID | <[email protected]> |
--==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain () 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=rcsrev.c.diff Content-Transfer-Encoding: quoted-printable 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 =2D-- a/src/rcsrev.c +++ b/src/rcsrev.c @@ -595,7 +595,8 @@ rev_from_symbol (struct cbuf const *id) { struct symdef const *d =3D ls->entry; =20 =2D if (!strncmp (d->meaningful, id->string, id->size)) + if ('\0' =3D=3D d->meaningful[id->size] + && !strncmp (d->meaningful, id->string, id->size)) return d->underlying; } return NULL; --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Does this fix work for you? =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlFbED8ACgkQZwMiJEyAdQL0ugCeMUq6c5IJLeN+rPVmd1V4240c cSEAoLOwveQLtd6w9f6+OqCG3asxKAfz =deoX -----END PGP SIGNATURE----- --==-=-=--