From abec6b127da9d32157b78e7a8d0cfdee407f5afe Mon Sep 17 00:00:00 2001 From: Peiwei Hu Date: Sun, 3 Sep 2023 00:52:12 +0800 Subject: [PATCH] Fix: wrong exit condition in rz_analysis_optype_from_string (#3821) --- librz/analysis/op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librz/analysis/op.c b/librz/analysis/op.c index d5d5df24e3..35122dee4f 100644 --- a/librz/analysis/op.c +++ b/librz/analysis/op.c @@ -295,7 +295,7 @@ static struct optype { RZ_API int rz_analysis_optype_from_string(RZ_NONNULL const char *name) { rz_return_val_if_fail(name, -1); int i; - for (i = 0; RZ_ARRAY_SIZE(optypes); i++) { + for (i = 0; i < RZ_ARRAY_SIZE(optypes); i++) { if (!strcmp(optypes[i].name, name)) { return optypes[i].type; }