mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +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.
|
||||
int i = 0;
|
||||
while (c > unicode_blocks[i].end && i < no_blocks)
|
||||
while (i < no_blocks && c > unicode_blocks[i].end)
|
||||
++i;
|
||||
if (i == no_blocks)
|
||||
return QString();
|
||||
|
Loading…
Reference in New Issue
Block a user