Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Small but serious bug when displaying hint in TovcCustomOutline

0 views
Skip to first unread message

Marc deroover

unread,
Dec 27, 2002, 4:00:49 PM12/27/02
to
Happy new year to everyone!

When a TovcOutline has a string of more than 255 chars, the program will
crash in loops of error notifications when the cursor is set on the item and
the hint is to be displayed.

This is because in the ovcOutln.pas unit, the

procedure TOvcCustomOutline.HoverTimerEvent(Sender : TObject; Handle :
Integer;
Interval : Cardinal; ElapsedTime : LongInt);
{display/hide hint with truncated text}

declares :

var
HintStr : array[0..255] of char;

and then do:

S := Node[Index].Text;
StrPCopy(HintStr, S);
Tw := HintWindow.Canvas.TextWidth(S);

The last line will crash the program if length( S) > 255 because HintStr is
not correct !

This internal limitation is not documented...


Per Larsen [TurboPower]

unread,
Dec 28, 2002, 3:57:34 AM12/28/02
to
Marc,

Hmm - yes. Sorry about that. I'll log a bug.

- Per

"Marc deroover" <mder...@arcadis.be> wrote in message
news:VQMQhser...@tpsmail01.turbopower.net...

0 new messages