[Libreoffice-commits] .: starmath/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 31 10:16:04 PDT 2012


 starmath/source/mathtype.cxx |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 4dd6c44628ab4e6b4debf22e58e01f9263a5a878
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 17:15:19 2012 +0000

    Related: rhbz#871516 plausible reason for crash in MathType::HandleRecords
    
    Change-Id: I431c0615de56ddc0fa2c0ea06567d32419d29440

diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 69aeabe..b911b5f 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -699,17 +699,14 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
                 rRet.Insert(aStr,nTextStart);
                 rRet += '\"';
             }
-            else
+            else if (nRecord == END && rRet.Len() > 0)
             {
-                if (nRecord == END)
-                {
-                    sal_Unicode cChar = 0;
-                    xub_StrLen nI = rRet.Len()-1;
-                    while (nI && ((cChar = rRet.GetChar(nI)) == ' '))
-                        --nI;
-                    if ((cChar == '=') || (cChar == '+') || (cChar == '-'))
-                        APPEND(rRet,"{}");
-                }
+                sal_Unicode cChar = 0;
+                xub_StrLen nI = rRet.Len()-1;
+                while (nI && ((cChar = rRet.GetChar(nI)) == ' '))
+                    --nI;
+                if ((cChar == '=') || (cChar == '+') || (cChar == '-'))
+                    APPEND(rRet,"{}");
             }
         }
 


More information about the Libreoffice-commits mailing list