From 2c5582ec3392715fe45cf39691f1d913704f8abb Mon Sep 17 00:00:00 2001 From: Abs62 Date: Thu, 19 Sep 2019 18:03:52 +0300 Subject: [PATCH] DSL: Fix handling of dsl "@" subcard in first line of card --- dsl.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dsl.cc b/dsl.cc index 227c5344..dd446993 100644 --- a/dsl.cc +++ b/dsl.cc @@ -89,7 +89,7 @@ DEF_EX_STR( exDictzipError, "DICTZIP error", Dictionary::Ex ) enum { Signature = 0x584c5344, // DSLX on little-endian, XLSD on big-endian - CurrentFormatVersion = 22 + BtreeIndexing::FormatVersion + Folding::Version, + CurrentFormatVersion = 23 + BtreeIndexing::FormatVersion + Folding::Version, CurrentZipSupportVersion = 2, CurrentFtsIndexVersion = 6 }; @@ -2323,12 +2323,15 @@ vector< sptr< Dictionary::Class > > makeDictionaries( bool wasEmptyLine = false; int headwordLine = scanner.getLinesRead() - 2; bool noSignificantLines = Folding::applyWhitespaceOnly( curString ).empty(); + bool haveLine = !noSignificantLines; // Skip the article's body for( ; ; ) { - if ( ! ( hasString = scanner.readNextLineWithoutComments( curString, curOffset ) ) - || ( curString.size() && !isDslWs( curString[ 0 ] ) ) ) + hasString = haveLine ? true : scanner.readNextLineWithoutComments( curString, curOffset ); + haveLine = false; + + if ( !hasString || ( curString.size() && !isDslWs( curString[ 0 ] ) ) ) { if( insideInsided ) {