From d4d3e443b1adf802a8d6a6c01f3679639474d782 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Wed, 20 Nov 2024 04:49:23 -0500 Subject: [PATCH] s --- src/dict/dsl.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dict/dsl.cc b/src/dict/dsl.cc index d02c3614..2f9ac9fc 100644 --- a/src/dict/dsl.cc +++ b/src/dict/dsl.cc @@ -1733,13 +1733,13 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f continue; } - // Make sure it's not an abbreviation file - + // Make sure it's not an abbreviation file. extSize of ".dsl" or ".dsl.dz" int extSize = ( uncompressedDsl ? 4 : 7 ); - if ( fileName.size() - extSize >= 5 - && qstrnicmp( fileName.c_str() + fileName.size() - extSize - 5, "_abrv", 5 ) == 0 ) { - // It is, skip it - continue; + if ( fileName.size() >= ( 5 + extSize ) ) { + if ( QByteArrayView( fileName ).chopped( extSize ).last( 5 ).compare( "_abrv", Qt::CaseInsensitive ) ) { + // It is, skip it + continue; + } } unsigned atLine = 0; // Indicates current line in .dsl, for debug purposes