cmd: add asserts to b_arglist_report_missing_args
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "command.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <blue/core/stringstream.h>
|
||||
#include <blue/object/string.h>
|
||||
#include <blue/term/print.h>
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user