mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-26 18:07:18 +00:00
Amend 16e67d4e
A docstring is not 0-terminated...
This commit is contained in:
parent
16e67d4ebb
commit
07150cd928
@ -991,7 +991,8 @@ void InsetMathMacro::validate(LaTeXFeatures & features) const
|
||||
// Avoid recursion on a recursive macro definition
|
||||
docstring const & def = data->definition();
|
||||
int pos = tokenPos(def, '\\', name());
|
||||
char_type c = def.at(pos + name().size());
|
||||
char_type c = pos + name().size() < def.size()
|
||||
? def.at(pos + name().size()) : 0;
|
||||
if (pos < 0 || (name().size() > 1 &&
|
||||
((c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z')))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user