Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-1327 Let decompiler handle Alignment and other small dynamic data-types

caheckman59527ad7b182
diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java
index 8544b69b28..44c76b31bb 100644
--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java
+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java
@@ -600,18 +600,16 @@ public class PcodeDataTypeManager {
appendNameIdAttributes(resBuf, origType);
if (sz < 16) {
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "unknown");
- SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
- resBuf.append('>');
}
else {
// Build an "opaque" structure with no fields
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "struct");
- SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
- if (isVarLength) {
- SpecXmlUtils.encodeBooleanAttribute(resBuf, "varlength", isVarLength);
- }
- resBuf.append('>');
}
+ SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
+ if (isVarLength) {
+ SpecXmlUtils.encodeBooleanAttribute(resBuf, "varlength", true);
+ }
+ resBuf.append('>');
}
return resBuf.toString();
}