mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-28 23:21:46 +00:00
GP-1320 corrected DTM used when Function Editor parses signature
This commit is contained in:
parent
edbad32508
commit
3f25f75782
@ -206,7 +206,7 @@ public class FunctionSignatureParser {
|
||||
// attempt to separate trailing parameter name from datatype and reparse
|
||||
int spaceIndex = arg.lastIndexOf(' ');
|
||||
if (spaceIndex < 0) {
|
||||
throw new ParseException("Can't resolve datatype: " + dt);
|
||||
throw new ParseException("Can't resolve datatype: " + arg);
|
||||
}
|
||||
int starIndex = arg.lastIndexOf('*');
|
||||
int nameIndex = Math.max(spaceIndex, starIndex) + 1;
|
||||
|
@ -416,7 +416,7 @@ public class DataTypeParser {
|
||||
// handle C primitives (e.g. long long, unsigned long int, etc.)
|
||||
DataType dataType = DataTypeUtilities.getCPrimitiveDataType(baseName);
|
||||
if (dataType != null) {
|
||||
return dataType;
|
||||
return dataType.clone(dtm);
|
||||
}
|
||||
|
||||
dtm.findDataTypes(baseName, list);
|
||||
|
@ -48,7 +48,8 @@ public class ParameterDefinitionImpl implements ParameterDefinition {
|
||||
* @throws IllegalArgumentException if invalid parameter datatype specified
|
||||
*/
|
||||
protected ParameterDefinitionImpl(String name, DataType dataType, String comment, int ordinal) {
|
||||
this.dataType = validateDataType(dataType, null, false);
|
||||
this.dataType = validateDataType(dataType,
|
||||
dataType != null ? dataType.getDataTypeManager() : null, false);
|
||||
this.name = name;
|
||||
this.comment = comment;
|
||||
this.ordinal = ordinal;
|
||||
|
Loading…
Reference in New Issue
Block a user