From 891584a361455f35106cbe440eda348ae89e1965 Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Sat, 2 Feb 2019 23:19:23 -0500 Subject: [PATCH] Fix random underflow --- endlessh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endlessh.c b/endlessh.c index 17f66e8..04ec83c 100644 --- a/endlessh.c +++ b/endlessh.c @@ -141,7 +141,7 @@ check(int r) static int randline(char *line) { - int len = 1 + rand() % 252; + int len = 2 + rand() % 251; for (int i = 0; i < len - 2; i++) line[i] = 32 + rand() % 95; line[len - 2] = 13;