From 751757a02c9d9c582be27cd8700b760e91c593bf Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Thu, 19 Feb 2026 10:27:03 -0500 Subject: [PATCH] Another correction to one function call that was not updated for the new property structure, causing the "instance abutment" command to potentially generate an incorrect set of values. --- database/DBcellname.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/database/DBcellname.c b/database/DBcellname.c index c7726ab7..2b296cc3 100644 --- a/database/DBcellname.c +++ b/database/DBcellname.c @@ -1619,6 +1619,7 @@ dbAbutmentUseFunc(selUse, use, transform, data) { Rect bbox, refbox; Transform *trans; + PropertyRecord *proprec; char *propvalue; char *refllx, *reflly, *refurx, *refury; bool found; @@ -1642,14 +1643,25 @@ dbAbutmentUseFunc(selUse, use, transform, data) } trans = &use->cu_transform; - propvalue = (char *)DBPropGet(use->cu_def, "FIXED_BBOX", &found); + proprec = DBPropGet(use->cu_def, "FIXED_BBOX", &found); if (!found) bbox = use->cu_def->cd_bbox; else { - if (sscanf(propvalue, "%d %d %d %d", &bbox.r_xbot, &bbox.r_ybot, - &bbox.r_xtop, &bbox.r_ytop) != 4) + if ((proprec->prop_type == PROPERTY_TYPE_DIMENSION) && + (proprec->prop_len == 4)) + { + bbox.r_xbot = proprec->prop_value.prop_integer[0]; + bbox.r_ybot = proprec->prop_value.prop_integer[1]; + bbox.r_xtop = proprec->prop_value.prop_integer[2]; + bbox.r_ytop = proprec->prop_value.prop_integer[3]; + } + else + { + TxError("Unable to parse the cell's FIXED_BBOX property; using " + "the instance bounding box instead.\n"); bbox = use->cu_def->cd_bbox; + } } GeoTransRect(trans, &bbox, &refbox);