diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c index c4ccaab7d23..67ecd3d7e95 100644 --- a/programs/cmd/tests/batch.c +++ b/programs/cmd/tests/batch.c @@ -186,7 +186,8 @@ static const char *compare_line(const char *out_line, const char *out_end, const && !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) { exp_ptr = exp_end; continue; - } + }else if(out_ptr == out_end || *out_ptr != *exp_ptr) + err = out_ptr; }else if(out_ptr == out_end || *out_ptr != *exp_ptr) { err = out_ptr; }