[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu Jul 6 14:40:46 UTC 2017


 sw/source/filter/ww8/ww8par3.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1cab72b41b761084258871bc39cfb583986c2395
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 6 14:31:48 2017 +0100

    nLCode is signed, so check for > 0
    
    Change-Id: I2e40d020d088679a8f9d197485a782d511012bd5
    Reviewed-on: https://gerrit.libreoffice.org/39657
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 3ad16e62ced7..1c8c3ab7cd60 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -220,7 +220,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
 {
     WW8FormulaListBox aFormula(*this);
 
-    if (pF->nLCode && rStr.getLength() >= pF->nLCode && rStr[pF->nLCode-1] == 0x01)
+    if (pF->nLCode > 0 && rStr.getLength() >= pF->nLCode && rStr[pF->nLCode-1] == 0x01)
         ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_DROPDOWN);
 
     const SvtFilterOptions& rOpt = SvtFilterOptions::Get();


More information about the Libreoffice-commits mailing list