Adjust typeref tags for variable length data-types

This commit is contained in:
caheckman 2021-05-21 20:50:10 -04:00
parent 6397e835dc
commit bb7bf84ac9
5 changed files with 35 additions and 11 deletions

View file

@ -277,6 +277,7 @@ public class PcodeDataTypeManager {
// construct a <typeref> tag but must build a full <type> tag.
return buildType(type, size);
}
size = 1;
}
else if (type.getLength() <= 0) {
return buildType(type, size);
@ -294,6 +295,9 @@ public class PcodeDataTypeManager {
if (id > 0) {
SpecXmlUtils.encodeUnsignedIntegerAttribute(resBuf, "id", id);
}
if (type.getLength() <= 0 && size > 0) {
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", size);
}
}
resBuf.append("/>");
return resBuf;