Skip to content

Ghidra is a software reverse engineering (SRE) framework

Reorder set language

caheckman1560158d2a40
diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java
index 413a1f1740..6d81421a7e 100644
--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java
+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java
@@ -629,6 +629,10 @@ public class DecompileOptions {
eliminateUnreachable ? "on" : "off");
appendOption(buf, "currentaction", iface.getSimplificationStyle(), "doubleprecis",
simplifyDoublePrecision ? "on" : "off");
+
+ // Must set language early so that the object is in place before other option changes
+ appendOption(buf, "setlanguage", displayLanguage.toString(), "", "");
+
appendOption(buf, "ignoreunimplemented", ignoreunimpl ? "on" : "off", "", "");
appendOption(buf, "inferconstptr", inferconstptr ? "on" : "off", "", "");
appendOption(buf, "nullprinting", nullToken ? "on" : "off", "", "");
@@ -652,8 +656,6 @@ public class DecompileOptions {
appendOption(buf, "integerformat", integerFormat.getOptionString(), "", "");
- appendOption(buf, "setlanguage", displayLanguage.toString(), "", "");
-
appendOption(buf, "protoeval", protoEvalModel, "", "");
buf.append("</optionslist>\n");
return buf.toString();