aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/cli.c')
-rw-r--r--src/stdlib/cli.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/stdlib/cli.c b/src/stdlib/cli.c
index 87ad75f8..d545cbc3 100644
--- a/src/stdlib/cli.c
+++ b/src/stdlib/cli.c
@@ -13,6 +13,7 @@
#include "../config.h"
#include "bools.h"
#include "bytes.h"
+#include "c_strings.h"
#include "cli.h"
#include "integers.h"
#include "metamethods.h"
@@ -232,11 +233,7 @@ void _tomo_parse_args(int argc, char *argv[], Text_t usage, Text_t help, const c
exit(0);
}
if (args.length > 0) {
- List_t arg_texts = EMPTY_LIST;
- for (int64_t i = 0; i < (int64_t)args.length; i++)
- List$insert_value(&arg_texts, Text$from_str(*(const char **)(args.data + i * args.stride)), I(0),
- sizeof(Text_t));
- print_err("Unknown flag values: ", Text$join(Text(" "), args));
+ print_err("Unknown flag values: ", generic_as_text(&args, true, List$info(&CString$info)));
}
}