mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: regression introduce by replacing qBinaryFind
This commit is contained in:
parent
80021a6328
commit
e26db104f7
|
@ -1402,7 +1402,7 @@ void BtreeIndex::getHeadwordsFromOffsets( QList<uint32_t> & offsets,
|
|||
QList<uint32_t>::Iterator it = std::lower_bound( begOffsets, endOffsets,
|
||||
articleOffset );
|
||||
|
||||
if( it!=offsets.end())
|
||||
if( it != offsets.end() && *it == articleOffset )
|
||||
{
|
||||
if( isCancelled && Utils::AtomicInt::loadAcquire( *isCancelled ) )
|
||||
return;
|
||||
|
|
|
@ -621,7 +621,7 @@ Q_UNUSED( parent );
|
|||
for( int x = 0; x < hws.length(); x++ )
|
||||
{
|
||||
QList< FtsHeadword >::iterator it = std::lower_bound( headwords.begin(), headwords.end(), hws.at( x ) );
|
||||
if( it != headwords.end() )
|
||||
if( it != headwords.end() && *it == hws.at( x ) )
|
||||
{
|
||||
it->dictIDs.push_back( hws.at( x ).dictIDs.front() );
|
||||
for( QStringList::const_iterator itr = it->foundHiliteRegExps.constBegin();
|
||||
|
|
Loading…
Reference in a new issue