From f5d17d27aee4f4587ffd73d4bbb4f462416f6cf9 Mon Sep 17 00:00:00 2001 From: Lowly Worm Date: Wed, 9 Aug 2023 09:43:35 -0400 Subject: [PATCH] match new r2bin struct type (#121) https://github.com/radareorg/radare2/commit/4a75b94b495207b158ebeb3397ab550cf261e76e renamed `o` to `bo`, follow that change so it builds --- src/R2Scope.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/R2Scope.cpp b/src/R2Scope.cpp index 4960dd04..b08579d6 100644 --- a/src/R2Scope.cpp +++ b/src/R2Scope.cpp @@ -442,10 +442,16 @@ Symbol *R2Scope::registerFlag(RFlagItem *flag) const { void *pos; r_list_foreach (core->bin->binfiles, iter, pos) { auto bf = reinterpret_cast(pos); - if (!bf->o) { + RBinObject *bo = NULL; +#if R2_VERSION_NUMBER < 50809 + bo = bf->o; +#else + bo = bf->bo; +#endif + if (!bo) { continue; } - void *s = ht_up_find (bf->o->strings_db, flag->offset, nullptr); + void *s = ht_up_find (bo->strings_db, flag->offset, nullptr); if (s) { str = reinterpret_cast(s); break;