From 91f40f2f7148d2e67e3d8cb94f862b039024de4d Mon Sep 17 00:00:00 2001 From: Anton Kochkov Date: Wed, 8 Nov 2023 07:32:12 +0800 Subject: [PATCH] Update Rizin to latest dev (#3262) * Update rizin to latest dev * Update used RzBin resources API --- rizin | 2 +- src/core/Cutter.cpp | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/rizin b/rizin index 71679b08..44400041 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit 71679b0800c657ad03fa374e989b2cd87433bd29 +Subproject commit 444000416cc929d4ce67116a46eaeee1d8a5b4fd diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index b70b1585..bd9983c3 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3805,19 +3805,22 @@ QList CutterCore::getAllResources() if (!bf) { return {}; } - const RzList *resources = rz_bin_object_get_resources(bf->o); + const RzPVector *resources = rz_bin_object_get_resources(bf->o); + if (!resources) { + return {}; + } + QList resourcesDescriptions; - RzBinResource *r; - RzListIter *it; - CutterRzListForeach (resources, it, RzBinResource, r) { + for (const auto &resource : CutterPVector(resources)) { ResourcesDescription description; - description.name = r->name; - description.vaddr = r->vaddr; - description.index = r->index; - description.type = r->type; - description.size = r->size; - description.lang = r->language; + description.name = resource->name; + description.vaddr = resource->vaddr; + description.index = resource->index; + description.type = resource->type; + description.size = resource->size; + description.lang = resource->language; + resourcesDescriptions << description; }