Bug in RVRuler.pas

General TRichView support forum. Please post your questions here
Post Reply
tmcdos
Posts: 3
Joined: Tue Aug 21, 2007 8:03 am
Location: Sofia, Bulgaria
Contact:

Bug in RVRuler.pas

Post by tmcdos »

I have a simple RVF file, which causes an exception "List index out of bounds (-1)" inside function TRVRuler.GetListIndents
After some debugging, I changed 1 line of code:

Code: Select all

  while not RVEditor.IsParaStart(FirstParaItemNo) do
    Dec(FirstParaItemNo);
became

Code: Select all

  while not RVEditor.IsParaStart(FirstParaItemNo) and (FirstParaItemNo>0) do
    Dec(FirstParaItemNo);
But I think that this check should be moved to GetItem method.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This bug is already fixed in the newer version of RVRuler.
No, I believe that TRichView.Get*** methods must generate exception when called with incorrect item index.
tmcdos
Posts: 3
Joined: Tue Aug 21, 2007 8:03 am
Location: Sofia, Bulgaria
Contact:

Post by tmcdos »

Sorry :)
I didn't know that it is fixed.
Post Reply