Commit 8099410c authored by Claes Sjofors's avatar Claes Sjofors

Rt and wb attribute offset for large array fixes

parent 7f7c9ea5
......@@ -295,7 +295,7 @@ mvol_AnameToAttribute (
if ( i != pn->nAttribute - 1) {
if ( pn->hasIndex[i])
offset += pn->index[i] * ap->adef->Info.Size / ap->adef->Info.Elements;
offset += pn->index[i] * (ap->adef->Info.Size / ap->adef->Info.Elements);
if ( !(ap->adef->Info.Flags & PWR_MASK_CLASS)) pwr_Return(NULL, sts, GDH__NOSUCHCLASS);
tid = ap->adef->TypeRef;
......@@ -479,7 +479,7 @@ mvol_ArefToAttribute (
if (arp->Offset > offset &&
((arp->Offset - offset) % (acp->attr[i].size / acp->attr[i].elem)) != 0)
pwr_Return(NULL, sts, GDH__ATTRIBUTE);
offset -= idx * acp->attr[i].size / acp->attr[i].elem;
offset -= idx * (acp->attr[i].size / acp->attr[i].elem);
break;
}
}
......@@ -980,7 +980,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
for ( j = 0; j < ap->elem; j++) {
if ( ODD(*sts) && item->numOffset < gdb_cCattOffsetSize) {
/* Insert in current item */
item->offset[item->numOffset] = offset + ap->offs + j * ap->size / ap->elem;
item->offset[item->numOffset] = offset + ap->offs + j * (ap->size / ap->elem);
item->flags[item->numOffset++] = ap->flags;
}
else {
......@@ -992,7 +992,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
itemr = ptree_Insert( sts, gdbroot->catt_tt, &key);
item = (gdb_sClassAttr *) pool_Address( sts, gdbroot->pool, itemr);
if ( item == NULL) return;
item->offset[item->numOffset] = offset + ap->offs + j * ap->size / ap->elem;
item->offset[item->numOffset] = offset + ap->offs + j * (ap->size / ap->elem);
item->flags[item->numOffset++] = ap->flags;
}
......@@ -1000,7 +1000,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
for (i=0; i < cp->acount; i++) {
if ( cp->attr[i].flags.b.isclass && cdh_tidIsCid( cp->attr[i].tid) && !cp->attr[i].flags.b.pointer) {
insertCattObject( sts, cid, &cp->attr[i],
offset + ap->offs + j * ap->size / ap->elem);
offset + ap->offs + j * (ap->size / ap->elem));
if ( EVEN(*sts)) return;
}
}
......
......@@ -769,7 +769,7 @@ int rtt_attribute_func (
}
}
object_element = object_par + element * attrsize / attrelem;
object_element = object_par + element * (attrsize / attrelem);
switch ( attrtype )
{
......
......@@ -5516,7 +5516,7 @@ static int rtt_show_parameter_add(
if ( element >= 0)
parameter_ptr += element * ad.attr->Param.Info.Size / elements;
parameter_ptr += element * (ad.attr->Param.Info.Size / elements);
/* Get class name */
sts = rtt_objidtoclassname( objid, classname);
......
......@@ -8173,7 +8173,7 @@ static int xnav_attribute_func (
}
}
object_element = object_par + element * attrsize / attrelem;
object_element = object_par + element * (attrsize / attrelem);
switch ( attrtype )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment