]> git.lyx.org Git - features.git/commit
Fix wrong parse of macro parameter and crash
authorGuillaume Munch <gm@lyx.org>
Tue, 3 Jan 2017 19:17:20 +0000 (20:17 +0100)
committerGuillaume Munch <gm@lyx.org>
Tue, 3 Jan 2017 19:35:41 +0000 (20:35 +0100)
commiteb2d373e4bdc6169d42f42ff5a886e3d36e86510
tree8066b9ef4c90ad1352d551d854fa1c7dbf6694aa
parent981f065bdeeb4fd214011f4988d1643a9e520986
Fix wrong parse of macro parameter and crash

Copy-pasting $#\n$ from text to LyX gives the error message:

    MathMacroArgument::MathMacroArgument: wrong Argument id

and it is not hard to get a crash soon after.

There are legitimate uses of # not followed by 1..9 in LaTeX and it is good to
parse them correctly when importing from LaTeX.
src/mathed/MathMacroArgument.cpp
src/mathed/MathMacroArgument.h
src/mathed/MathParser.cpp