commit 000dcb8672b68a6366ee48ce88c3adb57adecfd1
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Wed Mar 8 16:50:03 2017 +0100
Make a false positive explicit
Pleases coverity
---
src/mathed/MathData.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index 9d21898..8ff9461 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -825,7 +825,10 @@ void MathData::collectParameters(Cursor * cur,
}
// put cursor in argument again
- if (thisSlice != - 1 && thisPos == int(pos)) {
+ // Note: The first two expressions on the first line are
+ // equivalent (see caller), but making this explicit pleases
+ // coverity.
+ if (cur && thisSlice != -1 && thisPos == int(pos)) {
cur->append(params.size() - 1, argPos);
cur->append(argSlices);
(*cur)[thisSlice].pos() = macroPos;