fix sizeof crash on ARM

This commit is contained in:
ehouse 2004-09-28 01:09:22 +00:00
parent 65ff0fc071
commit 84b4934b4b

View file

@ -163,8 +163,6 @@ palm_dictionary_make( MPFORMAL XP_UCHAR* dictName, PalmDictList* dl )
for ( i = 0; i < nChars; ++i ) { for ( i = 0; i < nChars; ++i ) {
#ifdef NODE_CAN_4 #ifdef NODE_CAN_4
ctxt->super.faces16[i] = READ_UNALIGNED16( &facePtr[i] ); 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 #else
ctxt->super.faces16[i] = facePtr[i]; ctxt->super.faces16[i] = facePtr[i];
#endif #endif
@ -229,6 +227,9 @@ palm_dictionary_make( MPFORMAL XP_UCHAR* dictName, PalmDictList* dl )
ctxt->dictStarts[index].indexStart = 0xFFFFFFFFL; ctxt->dictStarts[index].indexStart = 0xFFFFFFFFL;
ctxt->super.topEdge = ctxt->dictStarts[0].array; ctxt->super.topEdge = ctxt->dictStarts[0].array;
#ifdef DEBUG
ctxt->super.numEdges = offset;
#endif
} }
setBlankTile( (DictionaryCtxt*)ctxt ); setBlankTile( (DictionaryCtxt*)ctxt );
@ -323,7 +324,7 @@ palm_dictionary_destroy( DictionaryCtxt* dict )
XP_ASSERT( !!dbRef ); 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 ); XP_FREE( dict->mpool, ctxt->super.faces16 );
@ -361,6 +362,8 @@ dict_edge_for_index( DictionaryCtxt* dict, XP_U32 index )
{ {
PalmDictionaryCtxt* ctxt = (PalmDictionaryCtxt*)dict; PalmDictionaryCtxt* ctxt = (PalmDictionaryCtxt*)dict;
array_edge* result; array_edge* result;
XP_ASSERT( index < dict->numEdges );
if ( index == 0 ) { if ( index == 0 ) {
result = NULL; result = NULL;