mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
GuiSymbols: fix char->block lookup
This commit is contained in:
parent
c8d1d0d33c
commit
a19be0314b
@ -177,10 +177,10 @@ QString getBlock(char_type c)
|
||||
int i = 0;
|
||||
while (i < no_blocks && c > unicode_blocks[i].end)
|
||||
++i;
|
||||
if (i == no_blocks)
|
||||
if (i == no_blocks || c < unicode_blocks[i].start)
|
||||
return QString();
|
||||
// cache the last block for guessing next time
|
||||
lastBlock = i;
|
||||
//LYXERR0("fail: " << int(c) << ' ' << lastBlock);
|
||||
return unicode_blocks[lastBlock].qname;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user