mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add a LATTEST, just in case this ever causes a problem.
Fixes coverity #23363.
This commit is contained in:
parent
df022f91b4
commit
7aa6f972da
@ -4622,6 +4622,11 @@ static depth_type getDepth(DocIterator const & it)
|
||||
if (!it[i].inset().inMathed())
|
||||
depth += it[i].paragraph().getDepth() + 1;
|
||||
// remove 1 since the outer inset does not count
|
||||
// we should have at least one non-math inset, so
|
||||
// depth should nevery be 0. but maybe it is worth
|
||||
// marking this, just in case.
|
||||
LATTEST(depth > 0);
|
||||
// coverity[INTEGER_OVERFLOW]
|
||||
return depth - 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user