mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
fixed recently introduced options bug
This commit is contained in:
parent
f92c5a53bd
commit
d34d2cfa8d
3 changed files with 37 additions and 15 deletions
|
@ -167,7 +167,10 @@ public abstract class AbstractOptions implements Options {
|
|||
valueMap.put(optionName, newOption);
|
||||
}
|
||||
|
||||
private void copyCurrentValue(Option currentOption, Option newOption) {
|
||||
protected void copyCurrentValue(Option currentOption, Option newOption) {
|
||||
if (currentOption.isDefault()) {
|
||||
return; // don't copy the current value if it is just the old default.
|
||||
}
|
||||
|
||||
Object currentValue = currentOption.getCurrentValue();
|
||||
OptionType type = currentOption.getOptionType();
|
||||
|
|
|
@ -51,10 +51,16 @@ public enum OptionType {
|
|||
private StringAdapter stringAdapter;
|
||||
|
||||
public Object convertStringToObject(String string) {
|
||||
if (string == null) {
|
||||
return null;
|
||||
}
|
||||
return stringAdapter.stringToObject(string);
|
||||
}
|
||||
|
||||
public String convertObjectToString(Object object) {
|
||||
if (object == null) {
|
||||
return null;
|
||||
}
|
||||
return stringAdapter.objectToString(object);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue