Change-Id: I7967a7ccf9cfe73beb147f41d2c1850f7ee63da5
if (boundary == Dali::Accessibility::TextBoundary::LINE)
counter++;
}
- if ((counter - 1) == offset)
+ if ((counter > 0) && ((counter - 1) == offset))
{
range.content = txt.substr(start, index - start + 1);
range.startOffset = start;
if (boundary == Dali::Accessibility::TextBoundary::LINE)
counter++;
}
- if ((counter - 1) == offset)
+ if ((counter > 0) && ((counter - 1) == offset))
{
range.content = txt.substr(start, index - start + 1);
range.startOffset = start;
if (boundary == Dali::Accessibility::TextBoundary::LINE)
counter++;
}
- if ((counter - 1) == offset)
+ if ((counter > 0) && ((counter - 1) == offset))
{
range.content = txt.substr(start, index - start + 1);
range.startOffset = start;