Home » U++ Library support » RichText,QTF,RTF... » BUG? in TxtPaint.cpp
Re: BUG? in TxtPaint.cpp [message #46758 is a reply to message #46757] |
Thu, 28 July 2016 10:42 |
borbek
Messages: 31 Registered: November 2010 Location: Russia
|
Member |
|
|
This code crash, for ex, on "Used packages->Core->Documents->Standard Ultimate++ packages". Perhaps 'parti' should be increased after 'Advance()'.
The following code works correctly:
void RichTxt::GatherValPos(Vector<RichValPos>& f, RichContext rc, int pos, int type) const
{
int parti = 0;
while(parti < part.GetCount()-1) { <--------------
RichContext begin;
Advance(parti++, rc, begin);
if(part[parti].Is<RichTable>())
GetTable(parti).GatherValPos(f, begin, pos, type);
else {
int nbefore = 0;
int nline = 0;
const Para& p = part[parti].Get<Para>();
if(p.haspos)
if(type == LABELS)
Get(parti, *begin.styles, true).GatherLabels(f, begin.page, begin.py, pos);
else
Get(parti, *begin.styles, true).GatherIndexes(f, begin.page, begin.py, pos);
}
pos += GetPartLength(parti) + 1;
}
}
[Updated on: Thu, 28 July 2016 10:48] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 06 09:15:13 CEST 2024
Total time taken to generate the page: 0.02466 seconds
|