mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
*! Read last .dsl line properly when it doesn't end with \n
This commit is contained in:
parent
d10634d3fc
commit
496e1c873c
|
@ -68,7 +68,7 @@ DEF_EX_STR( exCantReadFile, "Can't read file", Dictionary::Ex )
|
|||
enum
|
||||
{
|
||||
Signature = 0x584c5344, // DSLX on little-endian, XLSD on big-endian
|
||||
CurrentFormatVersion = 11 + BtreeIndexing::FormatVersion + Folding::Version
|
||||
CurrentFormatVersion = 12 + BtreeIndexing::FormatVersion + Folding::Version
|
||||
};
|
||||
|
||||
struct IdxHeader
|
||||
|
|
|
@ -622,12 +622,7 @@ bool DslScanner::readNextLine( wstring & out, size_t & offset ) throw( Ex,
|
|||
// Check that we have bytes to read
|
||||
if ( readBufferLeft < 4 ) // To convert one char, we need at most 4 bytes
|
||||
{
|
||||
if ( gzeof( f ) )
|
||||
{
|
||||
if ( !readBufferLeft )
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if ( !gzeof( f ) )
|
||||
{
|
||||
// To avoid having to deal with ring logic, we move the remaining bytes
|
||||
// to the beginning
|
||||
|
|
Loading…
Reference in a new issue