From d80c9192b2f8446536e464c64696eefee545833a Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 19 Mar 2024 10:52:57 +0800 Subject: [PATCH] Update bb to use pvec --- c/jsdec-plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c/jsdec-plugin.c b/c/jsdec-plugin.c index 5ba25e6..8d92a93 100644 --- a/c/jsdec-plugin.c +++ b/c/jsdec-plugin.c @@ -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);