diff --git a/nemu/tests/expr_test.c b/nemu/tests/expr_test.c index 7e359e9..6e37ae2 100644 --- a/nemu/tests/expr_test.c +++ b/nemu/tests/expr_test.c @@ -54,7 +54,7 @@ void gen_rand_op(void) { void gen_rand_expr(void) { int choice = rand() % 3; if (buf_ptr - buf > 2000) { - return; + choice = 0; } switch (choice) { case 0: gen_num(); break;