According to Antti Rauramo:
>
>
> Geoff Hutchison wrote:
>
> > OK, here's a completely untested patch. As it turns out, someone's in the
> > process of upgrading my development box, so I can't compile. :-(
> >
> > The first also takes care of a smallish memory leak in the display code.
> > The second should take care of the problems with empty descriptions. (I
> > noticed it checks for null strings, but not strings of nulls :-).
> >
> > So once again, not only are these untested, but I didn't get a chance to
> > compile them, so I might have made some silly mistake somewhere. If so,
> > please let me know...
>
> Ookay, thank you very much once again, here's the little silly mistake
> that
> came up in compiling:
>
> > *** htdig-3.1.1/htsearch/Display.cc Wed Feb 17 00:03:56 1999
> > --- htdig3/htsearch/Display.cc Wed Mar 10 13:57:06 1999
> [...]
> > *************** Display::displayMatch(ResultMatch *match
> [...]
> > --- 342,350 ----
> [...]
> > ! *description = ((String*) (*list)[0]);
>
> I think this should be "description = ((String*) (*list)[0]);", without
> the
> "*", that is.
>
> Or maybe I'm wrong, 'cause the patch seems to make another leak, or
> whatever.
> See http://www.edita.fi/cgi-bin/htdig/htsearch-descpatch?config=nm2, try
> searching for "iskusana".
Hmm, no, you definitely don't want to assign to description, because just
above that, description is set to point to a new String object. You must
assign to *description, so that the new String object receives the data
from the list entry. How about this?
*description = ((String*) (*list)[0])->get();
either that, or just get rid of the temporary variable "description", and
do something like this:
vars.Add("DESCRIPTION", new String(((String*) (*list)[0])->get()));
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.