mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
DictD: Fix dictionary name recognition for dictionaries from freedict.org (issue #1075)
This commit is contained in:
parent
382783e90e
commit
0d9a12a7e4
|
@ -718,7 +718,11 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
|
|||
char * articleBody = dict_data_read_( dz, articleOffset, articleSize, 0, 0 );
|
||||
if ( articleBody )
|
||||
{
|
||||
char * eol = strchr( articleBody, '\n' ); // skip the first line (headword itself)
|
||||
char * eol;
|
||||
if ( !strncmp( articleBody, "00databaseshort", 15 ) || !strncmp( articleBody, "00-database-short", 17 ) )
|
||||
eol = strchr( articleBody, '\n' ); // skip the first line (headword itself)
|
||||
else
|
||||
eol = articleBody; // No headword itself
|
||||
if ( eol )
|
||||
{
|
||||
while( *eol && Utf8::isspace( *eol ) ) ++eol; // skip spaces
|
||||
|
|
Loading…
Reference in a new issue