diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-04-20 16:45:12 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-20 20:43:55 +0200 |
commit | b37becd401e342bf658f9e9be69dbf7385781f45 (patch) | |
tree | 20b9165620e6b04bb3ed777cc4ad29740cf1d326 /editeng | |
parent | 1b62ccdcb5a44effe4f6f9de105d96fbbd18102d (diff) |
CharAttribList::OptimizeRanges: de-optimize to not crash so fast
Crashes on import of bugdoc from fdo#48969 with
Assertion `n < this->size()' failed.
(regression from b35980d9b28f1e3985f94238f7d8c9962f654bd0)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index c24e72bb592d..23549a776666 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -2682,10 +2682,10 @@ void CharAttribList::ResortAttribs() void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) { - for (size_t i = 0, n = aAttribs.size(); i < n; ++i) + for (size_t i = 0; i < aAttribs.size(); ++i) { EditCharAttrib& rAttr = aAttribs[i]; - for (size_t nNext = i+1; nNext < n; ++nNext) + for (size_t nNext = i+1; nNext < aAttribs.size(); ++nNext) { EditCharAttrib& rNext = aAttribs[nNext]; if (!rAttr.IsFeature() && rNext.GetStart() == rAttr.GetEnd() && rNext.Which() == rAttr.Which()) |