Fix build for the core->offset renaming

This commit is contained in:
pancake committed 2025-02-27 17:03:46 +01:00
1 parent 57f3267add
commit d2d3e503b8
1 file changed
+8
+8
View File
@@ -267,7 +267,11 @@ static void DecompileCmd (RCore *core, DecompileMode mode) {
#endif
RCodeMeta *code = nullptr;
std::stringstream out_stream;
#if R2_VERSION_NUMBER >= 50909
Decompile(core, core->addr, mode, out_stream, &code);
#else
Decompile(core, core->offset, mode, out_stream, &code);
#endif
switch (mode) {
case DecompileMode::DISASM:
{
@@ -424,7 +428,11 @@ static void Disassemble(RCore *core, ut64 ops) {
const Translate *trans = arch.translate;
PcodeRawOut emit (arch.translate);
AssemblyRaw assememit;
#if R2_VERSION_NUMBER >= 50909
Address addr (trans->getDefaultCodeSpace(), core->addr);
#else
Address addr (trans->getDefaultCodeSpace(), core->offset);
#endif
for (ut64 i = 0; i < ops; i++) {
try {
trans->printAssembly (assememit, addr);