Page 1 of 1

Bug in RVRuler.pas

Posted: Tue Aug 21, 2007 8:12 am
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.

Posted: Tue Aug 21, 2007 10:02 am
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.

Posted: Tue Aug 21, 2007 1:25 pm
by tmcdos
Sorry :)
I didn't know that it is fixed.