commit 8ec4f359f11c5cecd617e1e163eddda6eda5ae7a
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Apr 8 16:49:03 2025 +0200
Add assertion to please Coverity Scan
---
src/mathed/MathData.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index 34e4a0be1c..262f70839b 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -697,6 +697,9 @@ void MathData::attachMacroParameters(Cursor * cur,
const int macroOptionals, const bool fromInitToNormalMode,
const bool interactiveInit, const size_t appetite)
{
+ // Coverity Scan believes that this can happen
+ LATTEST(macroPos != lyx::npos);
+
InsetMathMacro * macroInset = operator[](macroPos).nucleus()->asMacro();
// start at atom behind the macro again, maybe with some new arguments
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs