mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Do not read array before checking the bounds
Fixes coverity issue 23377
This commit is contained in:
parent
2694fde47d
commit
143c136a7f
@ -176,7 +176,7 @@ QString getBlock(char_type c)
|
|||||||
|
|
||||||
// guessing was wrong so far. do a real search.
|
// guessing was wrong so far. do a real search.
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (c > unicode_blocks[i].end && i < no_blocks)
|
while (i < no_blocks && c > unicode_blocks[i].end)
|
||||||
++i;
|
++i;
|
||||||
if (i == no_blocks)
|
if (i == no_blocks)
|
||||||
return QString();
|
return QString();
|
||||||
|
Loading…
Reference in New Issue
Block a user