sw/source/filter/ww8/ww8scan.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 8578df9017ab3786f7c40929220c4db36b090a06 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Aug 24 09:36:42 2015 +0100 fix crash with empty booknames Change-Id: Ifadb2129be53530720cb2023cdc0782b6e737f18 (cherry picked from commit 11e73a0880f64c99aec5059ff6122b831bc1de74) Reviewed-on: https://gerrit.libreoffice.org/17944 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 1595f50..857e4e2 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4202,17 +4202,18 @@ bool WW8PLCFx_Book::MapName(OUString& rName) return false; bool bFound = false; - sal_uInt16 i = 0; - do + + size_t i = 0; + while (i < aBookNames.size()) { if (rName.equalsIgnoreAsciiCase(aBookNames[i])) { rName = aBookNames[i]; bFound = true; + break; } ++i; } - while (!bFound && i < pBook[0]->GetIMax()); return bFound; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits