Skip to content

Commit

Permalink
GP-4756 Corrected StructureDB length update issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidra1 committed Jul 9, 2024
1 parent 282c6b6 commit 369bf3b
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2472,21 +2472,23 @@ private boolean adjustNonPackedComponents(boolean setLastChangeTime) {
private boolean updateComposite(int currentNumComponents, int currentLength,
int currentAlignment, boolean setLastChangeTime) {
boolean compositeChanged = false;
if (currentNumComponents >= 0 && currentNumComponents != record
.getIntValue(CompositeDBAdapter.COMPOSITE_NUM_COMPONENTS_COL)) {
if (currentNumComponents >= 0 &&
(currentNumComponents != numComponents || currentNumComponents != record
.getIntValue(CompositeDBAdapter.COMPOSITE_NUM_COMPONENTS_COL))) {
numComponents = currentNumComponents;
record.setIntValue(CompositeDBAdapter.COMPOSITE_NUM_COMPONENTS_COL, numComponents);
setLastChangeTime = true;
compositeChanged = true;
}
if (currentLength >= 0 &&
currentLength != record.getIntValue(CompositeDBAdapter.COMPOSITE_LENGTH_COL)) {
if (currentLength >= 0 && (currentLength != structLength ||
currentLength != record.getIntValue(CompositeDBAdapter.COMPOSITE_LENGTH_COL))) {
structLength = currentLength;
record.setIntValue(CompositeDBAdapter.COMPOSITE_LENGTH_COL, structLength);
compositeChanged = true;
}
if (currentAlignment >= 0 &&
currentAlignment != record.getIntValue(CompositeDBAdapter.COMPOSITE_ALIGNMENT_COL)) {
(currentAlignment != structAlignment || currentAlignment != record
.getIntValue(CompositeDBAdapter.COMPOSITE_ALIGNMENT_COL))) {
structAlignment = currentAlignment;
record.setIntValue(CompositeDBAdapter.COMPOSITE_ALIGNMENT_COL, structAlignment);
compositeChanged = true;
Expand Down

0 comments on commit 369bf3b

Please sign in to comment.