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

CID#736192 out of bounds

Change-Id: I7ab1baa96e004122bd03d7b057effaf6b1ca7fe2
üst b8d18c1b
...@@ -135,7 +135,16 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum) ...@@ -135,7 +135,16 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
if (rTxtNd.IsCountedInList() && pRule) if (rTxtNd.IsCountedInList() && pRule)
{ {
sNumber = rTxtNd.GetNumString(false); sNumber = rTxtNd.GetNumString(false);
const SwNumFmt& rNFmt = pRule->Get(static_cast<unsigned short>(rTxtNd.GetActualListLevel()));
int nListLevel = rTxtNd.GetActualListLevel();
if (nListLevel < 0)
nListLevel = 0;
if (nListLevel >= MAXLEVEL)
nListLevel = MAXLEVEL - 1;
const SwNumFmt& rNFmt = pRule->Get(static_cast<unsigned short>(nListLevel));
sPost = rNFmt.GetSuffix(); sPost = rNFmt.GetSuffix();
sPre = rNFmt.GetPrefix(); sPre = rNFmt.GetPrefix();
} }
......
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