Fix for TypeDef and Void causing exceptions in FillOutStructure

This commit is contained in:
caheckman 2020-08-27 14:09:38 -04:00
parent a80ba76b04
commit 7ba8961bdb
2 changed files with 13 additions and 1 deletions

View file

@ -91,10 +91,22 @@ public enum MetaDataType {
return aCopy;
}
if (aMeta == MetaDataType.PTR) {
if (a instanceof TypeDef) {
a = ((TypeDef) a).getBaseDataType();
}
if (b instanceof TypeDef) {
b = ((TypeDef) b).getBaseDataType();
}
a = ((Pointer) a).getDataType();
b = ((Pointer) b).getDataType();
}
else if (aMeta == MetaDataType.ARRAY) {
if (a instanceof TypeDef) {
a = ((TypeDef) a).getBaseDataType();
}
if (b instanceof TypeDef) {
b = ((TypeDef) b).getBaseDataType();
}
if (!(a instanceof Array) || !(b instanceof Array)) {
break;
}

View file

@ -79,7 +79,7 @@ public class NoisyStructureBuilder {
* @param dt is the data-type of field if known (null otherwise)
*/
public void addDataType(long offset, DataType dt) {
if (dt == null) {
if (dt == null || dt instanceof VoidDataType) {
computeMax(offset, 1);
return;
}