From 76a5d8cef50d1f63acfcee26b05cf1cca94c5dab Mon Sep 17 00:00:00 2001 From: "cyril.cros" Date: Thu, 16 Jul 2026 14:00:52 +0200 Subject: [PATCH] Fix segmentation fault on unknown argument When parsing a non existing argument, there is a couple of typos in CommandLines.cpp that incorrectly report the command line is valid. It is a simple switch of 0 vs 1. I built and tested locally. --- CommandLines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommandLines.cpp b/CommandLines.cpp index 256a35a5..edc88323 100644 --- a/CommandLines.cpp +++ b/CommandLines.cpp @@ -1011,12 +1011,12 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt) else if (c == ':') { fprintf(stderr, "[ERROR] missing option argument in \"%s\"\n", argv[opt.i - 1]); - return 1; + return 0; } else if (c == '?') { fprintf(stderr, "[ERROR] unknown option in \"%s\"\n", argv[opt.i - 1]); - return 1; + return 0; } }