Skip to content

Commit

Permalink
Update used RzBin resources API
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Nov 6, 2023
1 parent aca2e31 commit beb61ec
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/core/Cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3805,19 +3805,22 @@ QList<ResourcesDescription> 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<ResourcesDescription> resourcesDescriptions;

RzBinResource *r;
RzListIter *it;
CutterRzListForeach (resources, it, RzBinResource, r) {
for (const auto &resource : CutterPVector<RzBinResource>(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;
}

Expand Down

0 comments on commit beb61ec

Please sign in to comment.