From c514656ec2ba49094c05a0d36405f356671624cc Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 17 Oct 2004 20:06:35 +0000 Subject: [PATCH] Fix math-mutate (something invalid) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9094 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 7 ++++++- src/mathed/math_hullinset.C | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 502a39dd0a..09d22478e3 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,6 +1,11 @@ +2004-10-15 Georg Baum + + * math_hullinset.C (mutate): fix endless loop for unknown types + 2004-10-05 Andreas Vox - * math_hullinset.C (docbook): write additional tag for Docbook XML + * math_hullinset.C (docbook): write additional + tag for Docbook XML 2004-09-21 Jean-Marc Lasgouttes diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index 941c438624..5d068841c4 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -110,7 +110,7 @@ namespace { if (s == "gather") return 9; if (s == "flalign") return 10; lyxerr << "unknown hull type '" << s << "'" << endl; - return 0; + return -1; } bool smaller(string const & s, string const & t) @@ -700,6 +700,10 @@ void MathHullInset::mutate(string const & newtype) // done } + else if (typecode(newtype) < 0) { + // unknown type + } + else if (type_ == "none") { setType("simple"); numbered(0, false); -- 2.39.2