mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +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 );
|
andLoadSpecialData( ctxt, &ptr );
|
||||||
|
|
||||||
dictLength -= ptr - (XP_U8*)mappedBase;
|
dictLength -= ptr - (XP_U8*)mappedBase;
|
||||||
if ( dictLength > sizeof(XP_U32) ) {
|
if ( dictLength >= sizeof(offset) ) {
|
||||||
offset = n_ptr_tohl( &ptr );
|
offset = n_ptr_tohl( &ptr );
|
||||||
dictLength -= sizeof(offset);
|
dictLength -= sizeof(offset);
|
||||||
#ifdef NODE_CAN_4
|
#ifdef NODE_CAN_4
|
||||||
|
|
Loading…
Reference in a new issue