Kaydet (Commit) 11e73a08 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix crash with empty booknames

Change-Id: Ifadb2129be53530720cb2023cdc0782b6e737f18
üst 4dfbb122
...@@ -4170,17 +4170,18 @@ bool WW8PLCFx_Book::MapName(OUString& rName) ...@@ -4170,17 +4170,18 @@ bool WW8PLCFx_Book::MapName(OUString& rName)
return false; return false;
bool bFound = false; bool bFound = false;
sal_uInt16 i = 0;
do size_t i = 0;
while (i < aBookNames.size())
{ {
if (rName.equalsIgnoreAsciiCase(aBookNames[i])) if (rName.equalsIgnoreAsciiCase(aBookNames[i]))
{ {
rName = aBookNames[i]; rName = aBookNames[i];
bFound = true; bFound = true;
break;
} }
++i; ++i;
} }
while (!bFound && i < pBook[0]->GetIMax());
return bFound; return bFound;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment