Skip to content

Commit

Permalink
Update bb to use pvec
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Mar 19, 2024
1 parent 9bbd0fb commit 21a9b20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions c/jsdec-cutter.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ static JSValue js_analysis_opcodes(JSContext *ctx, RzCore *core) {
static JSValue js_function_bbs(JSContext *ctx, RzCore *core, RzAnalysisFunction *fcn) {
JSValue bbs = JS_NewArray(ctx);
RzAnalysisBlock *bbi;
RzListIter *iter;
void **iter;
st64 bbs_idx = 0;
ut64 old_offset = core->offset;
ut64 old_bsize = core->blocksize;
rz_list_foreach (fcn->bbs, iter, bbi) {
rz_pvector_foreach (fcn->bbs, iter) {
bbi = (RzAnalysisBlock *)*iter;
rz_core_block_size(core, bbi->size);
rz_core_seek(core, bbi->addr, true);

Expand Down
5 changes: 3 additions & 2 deletions c/jsdec-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ static JSValue js_analysis_opcodes(JSContext *ctx, RzCore *core) {
static JSValue js_function_bbs(JSContext *ctx, RzCore *core, RzAnalysisFunction *fcn) {
JSValue bbs = JS_NewArray(ctx);
RzAnalysisBlock *bbi;
RzListIter *iter;
void **iter;
st64 bbs_idx = 0;
ut64 old_offset = core->offset;
ut64 old_bsize = core->blocksize;
rz_list_foreach (fcn->bbs, iter, bbi) {
rz_pvector_foreach (fcn->bbs, iter) {
bbi = (RzAnalysisBlock *)*iter;
rz_core_block_size(core, bbi->size);
rz_core_seek(core, bbi->addr, true);

Expand Down

0 comments on commit 21a9b20

Please sign in to comment.