Merge pull request #1198 from shenlebantongying/fts_crash

fix: makeFTSIndex crash at startup when indexed articleCount is zero
This commit is contained in:
xiaoyifang 2023-10-06 16:24:47 +08:00 committed by GitHub
commit 649cf17595
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,7 @@ void makeFTSIndex( BtreeIndexing::BtreeDictionary * dict, QAtomicInt & isCancell
QVector< uint32_t > offsets;
offsets.resize( setOfOffsets.size() );
uint32_t * ptr = &offsets.front();
uint32_t * ptr = offsets.data();
for ( QSet< uint32_t >::ConstIterator it = setOfOffsets.constBegin(); it != setOfOffsets.constEnd(); ++it ) {
*ptr = *it;