[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Tue Mar 7 02:49:30 UTC 2017
starmath/source/parse.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 39ec34b867ee60a5da68fd1e5e08b476f0b0c0ca
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon Mar 6 17:36:44 2017 +0900
starmath: Avoid creating SmFontNode with a default token
when an unexpected token is found.
Change-Id: I1a11c08ce54c55bb32289498fbb26af019396b83
Reviewed-on: https://gerrit.libreoffice.org/34918
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index a2ba869..76c4b24 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1802,7 +1802,10 @@ void SmParser::DoColor()
NextToken();
}
else
+ {
Error(SmParseError::ColorExpected);
+ return;
+ }
} while (m_aCurToken.eType == TCOLOR);
m_aNodeStack.push_front(o3tl::make_unique<SmFontNode>(aToken));
@@ -1822,7 +1825,10 @@ void SmParser::DoFont()
NextToken();
}
else
+ {
Error(SmParseError::FontExpected);
+ return;
+ }
} while (m_aCurToken.eType == TFONT);
m_aNodeStack.push_front(o3tl::make_unique<SmFontNode>(aToken));
More information about the Libreoffice-commits
mailing list