Bug in prefix hierarchy handling?

David Loeffler dl267@hermes.cam.ac.uk
Fri, 16 Jan 2004 18:17:05 +0000 (GMT)


On Fri, 16 Jan 2004, Olly Betts wrote:

> > Something may have been wrongly implemented with the meanings of
> > these numbers.
>
> This is correct - there's an off by one error in decoding which
> manifests itself only very rarely.  So the file generated by cavern is
> correct - the code which reads the file into aven, 3dtopos, etc is
> wrong.
>
> Thanks for finding the smaller test case Dave - it was very useful in
> helping track down the problem quickly.

No problem.

> > I suspect it is the long names and multiple levels of hierarchy that has
> > caused this bug to come to light.
>
> Pretty much - it'll only strike when more than 17 characters need
> removing to get to the next name, and then only if the 17th character
> from the end is a dot.

Is it fixable? (I've had a play with lines 766 and 767 of img.c in my copy
and succeeded in getting the test case to work, but at the same time I
introduced a raft of other errors in its place; presumably it can't be
that difficult to fix for those who actually know what they're doing.)

In the meantime I'll just change the names of my stations a bit :-)

David

------------------------------------------------------------------------
David Loeffler		Tackle Master, Cambridge University Caving Club
Trinity College		(http://cucc.survex.com/)
Cambridge
CB2 1TQ			President, Trinity Mathematical Society
m: 07792318628		(http://www.srcf.ucam.org/tms/)
------------------------------------------------------------------------