> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
 02:58:02  up 1 day  3:13,  2 users,  load average: 1.13, 0.85, 0.70
This commit is contained in:
tracer-ysyx 2024-01-13 02:58:02 +08:00 committed by xinyangli
parent b97e2bf469
commit a0c0c2c776

View file

@ -53,6 +53,9 @@ void gen_rand_op(void) {
void gen_rand_expr(void) {
int choice = rand() % 3;
if (buf_ptr - buf > 2000) {
return;
}
switch (choice) {
case 0: gen_num(); break;
case 1: gen('('); gen_rand_expr(); gen(')'); break;