mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Limit the number of iterations for some tabular features in math
Try to please Coverity scan.
This commit is contained in:
parent
3f5b836aa9
commit
716e20ae1b
@ -36,4 +36,15 @@ void lyxbreaker(void const * data, const char * hint, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
void CoordCache<T>::check(T const * thing, char const * hint) const
|
||||||
|
{
|
||||||
|
typename cache_type::const_iterator it = data_.find(thing);
|
||||||
|
|
||||||
|
if (it == data_.end() || it->second.pos.x == -10000)
|
||||||
|
__coverity_panic__();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,11 +59,12 @@ static docstring verboseHLine(int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// read a number to be used as an iteration count (limited arbitrary to 1000)
|
||||||
static int extractInt(istream & is)
|
static int extractInt(istream & is)
|
||||||
{
|
{
|
||||||
int num = 1;
|
int num = 1;
|
||||||
is >> num;
|
is >> num;
|
||||||
return (num == 0) ? 1 : num;
|
return min(max(num, 1), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user