mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
opt: headword parse modification
This commit is contained in:
parent
1ff838c876
commit
e8cb709029
|
@ -1675,6 +1675,11 @@ static void handleIdxSynFile( string const & fileName,
|
|||
for ( char const * ptr = &image.front(); ptr != &image.back(); ) {
|
||||
size_t wordLen = strlen( ptr );
|
||||
|
||||
if ( wordLen == 0 ) {
|
||||
ptr++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ptr + wordLen + 1 + ( isSynFile ? sizeof( uint32_t ) : sizeof( uint32_t ) * 2 ) > &image.back() ) {
|
||||
GD_FDPRINTF( stderr, "Warning: sudden end of file %s\n", fileName.c_str() );
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue