From 57f21020fc86c43ee038a5076583cc10876f5594 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 12 Oct 2025 17:29:22 +0100 Subject: [PATCH] cmd: add asserts to b_arglist_report_missing_args --- cmd/report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/report.c b/cmd/report.c index aebb08a..f14b9bb 100644 --- a/cmd/report.c +++ b/cmd/report.c @@ -1,5 +1,6 @@ #include "command.h" +#include #include #include #include @@ -132,11 +133,13 @@ enum b_status b_arglist_report_missing_args( if (opt_id != B_COMMAND_INVALID_ID) { opt = b_command_get_option_with_id(args->list_command, opt_id); + assert(opt); } if (arg_id != B_COMMAND_INVALID_ID) { arg = opt ? b_command_option_get_arg_with_id(opt, arg_id) : b_command_get_arg_with_id(args->list_command, arg_id); + assert(arg); } struct b_string *usage = z__b_command_default_usage_string(