From 7d66c4700490508768cae3cd474a63db2fb9f142 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 8 Feb 2023 12:48:39 +0200 Subject: src: Fix iteration over actions Minor bug-fix for avoiding printing items over what the array can handle. Bug-AGL: SPEC-4673 Signed-off-by: Marius Vlad Change-Id: I770d8d0abba3537bfd32eef36ab13ca705706a0e --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 24f3288..dc3dd82 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -182,7 +182,7 @@ int main(int argc, char *argv[]) break; fprintf(stderr, "Unknown action passed. Possible actions:\n\t"); - for (size_t i = 0; ARRAY_LENGTH(actions); i++) + for (size_t i = 0; i < ARRAY_LENGTH(actions); i++) fprintf(stderr, " %s ", actions[i].name); help(argv); -- cgit 1.2.3-korg