From 32a4f6b894cfd3a0c550b60b1cd74f926b3d259d Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 22 Jan 2022 16:29:37 -0800 Subject: [PATCH] [c] Make wordexp fail on undefined variables --- c/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/main.c b/c/main.c index 3832191..c6707cf 100644 --- a/c/main.c +++ b/c/main.c @@ -219,7 +219,7 @@ int handle_wordexp_result(int result, char *cmd) { int process_command(char *line, options_t options) { wordexp_t words; - int result = wordexp(line, &words, WRDE_SHOWERR); + int result = wordexp(line, &words, WRDE_SHOWERR | WRDE_UNDEF); if (handle_wordexp_result(result, line) && words.we_wordc > 0) { if (options->verbose) { int i;