builtin: Reset t_wp_op in testcmd The global variable t_wp_op needs to be reset every time testcmd is called or it may cause incorrect parsing of the arguments. Reported-by: Martijn Dekker <martijn@inlv.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/src/bltin/test.c b/src/bltin/test.c index bab9a1f..58c05fe 100644 --- a/src/bltin/test.c +++ b/src/bltin/test.c
@@ -193,6 +193,8 @@ argv[argc] = NULL; } + t_wp_op = NULL; + recheck: argv++; argc--;