From: Richard Heck Date: Wed, 3 Nov 2010 20:12:18 +0000 (+0000) Subject: Fix bug #7014. The problem here is that we get DEFSKIP if we don't X-Git-Tag: 2.0.0~2100 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=01af564dc28d71ba8caa54f2d30f88ec54b627b4;p=features.git Fix bug #7014. The problem here is that we get DEFSKIP if we don't recognize the argument, but that leads to an infinite loop. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36012 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 5455847e96..d483cbbd74 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -645,11 +645,11 @@ string BufferParams::readToken(Lexer & lex, string const & token, pimpl_->indentation = HSpace(indentation); } else if (token == "\\defskip") { lex.next(); - string defskip = lex.getString(); - if (defskip == "defskip") - // this is invalid - defskip = "medskip"; + string const defskip = lex.getString(); pimpl_->defskip = VSpace(defskip); + if (pimpl_->defskip.kind() == VSpace::DEFSKIP) + // that is invalid + pimpl_->defskip = VSpace(VSpace::MEDSKIP); } else if (token == "\\quotes_language") { string quotes_lang; lex >> quotes_lang;