mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
correctly detect empty dict and set top ptr to null. Fixes crash
using empty dicts.
This commit is contained in:
parent
c5e0955460
commit
53de4eab9b
1 changed files with 1 additions and 1 deletions
|
@ -320,7 +320,7 @@ parseDict( AndDictionaryCtxt* ctxt, XP_U8* ptr, XP_U32 dictLength )
|
|||
andLoadSpecialData( ctxt, &ptr );
|
||||
|
||||
dictLength -= ptr - (XP_U8*)mappedBase;
|
||||
if ( dictLength > sizeof(XP_U32) ) {
|
||||
if ( dictLength >= sizeof(offset) ) {
|
||||
offset = n_ptr_tohl( &ptr );
|
||||
dictLength -= sizeof(offset);
|
||||
#ifdef NODE_CAN_4
|
||||
|
|
Loading…
Reference in a new issue