fix bad alignment

This commit is contained in:
Vitor Santos Costa 2013-06-22 00:27:31 -05:00
parent e50f62ba3f
commit b257218ece

View File

@ -1521,7 +1521,7 @@ CreateDBStruct(Term Tm, DBProp p, int InFlag, int *pstat, UInt extra_size, struc
* for the number of links * for the number of links
*/ */
flag = DBComplex; flag = DBComplex;
CodeAbs += CellPtr(dbg->lr) - CellPtr(dbg->LinkAr); CodeAbs += (NOfLinks+(sizeof(CELL)/sizeof(BITS32)-1))/(sizeof(CELL)/sizeof(BITS32));
if ((CELL *)((char *)ntp0+(CELL)CodeAbs) > AuxSp) { if ((CELL *)((char *)ntp0+(CELL)CodeAbs) > AuxSp) {
LOCAL_Error_Size = (UInt)DBLength(CodeAbs); LOCAL_Error_Size = (UInt)DBLength(CodeAbs);
LOCAL_Error_TYPE = OUT_OF_AUXSPACE_ERROR; LOCAL_Error_TYPE = OUT_OF_AUXSPACE_ERROR;