mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-3216 Fixed CParser creation of Enums from define's with upper and
lower case u,l,ul when value surrounded by parentheses
This commit is contained in:
parent
cc6abb596d
commit
b10d01a2cb
4 changed files with 46 additions and 4 deletions
|
@ -257,7 +257,7 @@ public class AddressEvaluator {
|
|||
if (globalSymbols.size() == 1) {
|
||||
return globalSymbols.get(0).getAddress();
|
||||
}
|
||||
return null;
|
||||
return getValueObject(tok);
|
||||
}
|
||||
|
||||
private static Object getValueObject(String strValue) {
|
||||
|
@ -268,10 +268,11 @@ public class AddressEvaluator {
|
|||
start = 2;
|
||||
radix = 16;
|
||||
}
|
||||
if (strValue.endsWith("UL")) {
|
||||
strValue = strValue.toLowerCase();
|
||||
if (strValue.endsWith("ul")) {
|
||||
strValue = strValue.substring(start, strValue.length() - 2);
|
||||
}
|
||||
else if (strValue.endsWith("L") || strValue.endsWith("l") || strValue.endsWith("U")) {
|
||||
else if (strValue.endsWith("l") || strValue.endsWith("u")) {
|
||||
strValue = strValue.substring(start, strValue.length() - 1);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue