From 4e8e630085463d302ae8b5f6a0dbcec998c51efd Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Sat, 23 Dec 2023 21:40:52 +0100 Subject: fix choose command range --- stage3/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stage3/shell.c b/stage3/shell.c index d64e5be..28de4f9 100644 --- a/stage3/shell.c +++ b/stage3/shell.c @@ -298,7 +298,7 @@ static void cmd_choose(str arg) iter = f; int chosen = rand() % choices; str line; - for (int i = 0; i < chosen; i++) + for (int i = 0; i < chosen+1; i++) line = str_walk(&iter, S("\n")); print(line); print_char('\n'); -- cgit v1.2.3