mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
fix sizeof crash on ARM
This commit is contained in:
parent
65ff0fc071
commit
84b4934b4b
1 changed files with 6 additions and 3 deletions
|
@ -163,8 +163,6 @@ palm_dictionary_make( MPFORMAL XP_UCHAR* dictName, PalmDictList* dl )
|
|||
for ( i = 0; i < nChars; ++i ) {
|
||||
#ifdef NODE_CAN_4
|
||||
ctxt->super.faces16[i] = READ_UNALIGNED16( &facePtr[i] );
|
||||
XP_LOGF( "faces16[%d] = 0x%x (%d)", i, ctxt->super.faces16[i],
|
||||
ctxt->super.faces16[i] );
|
||||
#else
|
||||
ctxt->super.faces16[i] = facePtr[i];
|
||||
#endif
|
||||
|
@ -229,6 +227,9 @@ palm_dictionary_make( MPFORMAL XP_UCHAR* dictName, PalmDictList* dl )
|
|||
ctxt->dictStarts[index].indexStart = 0xFFFFFFFFL;
|
||||
|
||||
ctxt->super.topEdge = ctxt->dictStarts[0].array;
|
||||
#ifdef DEBUG
|
||||
ctxt->super.numEdges = offset;
|
||||
#endif
|
||||
}
|
||||
|
||||
setBlankTile( (DictionaryCtxt*)ctxt );
|
||||
|
@ -323,7 +324,7 @@ palm_dictionary_destroy( DictionaryCtxt* dict )
|
|||
|
||||
XP_ASSERT( !!dbRef );
|
||||
|
||||
MemPtrUnlock( ctxt->super.countsAndValues - sizeof(Xloc_header) );
|
||||
MemPtrUnlock( ctxt->super.countsAndValues - 2 );//sizeof(Xloc_header) );
|
||||
|
||||
XP_FREE( dict->mpool, ctxt->super.faces16 );
|
||||
|
||||
|
@ -362,6 +363,8 @@ dict_edge_for_index( DictionaryCtxt* dict, XP_U32 index )
|
|||
PalmDictionaryCtxt* ctxt = (PalmDictionaryCtxt*)dict;
|
||||
array_edge* result;
|
||||
|
||||
XP_ASSERT( index < dict->numEdges );
|
||||
|
||||
if ( index == 0 ) {
|
||||
result = NULL;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue