starmath/source/parse.cxx | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 39ec34b867ee60a5da68fd1e5e08b476f0b0c0ca Author: Takeshi Abe <t...@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 <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@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)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits