mirror of
https://github.com/skeeto/endlessh.git
synced 2025-12-10 06:55:36 +00:00
Fix random underflow
This commit is contained in:
@@ -141,7 +141,7 @@ check(int r)
|
|||||||
static int
|
static int
|
||||||
randline(char *line)
|
randline(char *line)
|
||||||
{
|
{
|
||||||
int len = 1 + rand() % 252;
|
int len = 2 + rand() % 251;
|
||||||
for (int i = 0; i < len - 2; i++)
|
for (int i = 0; i < len - 2; i++)
|
||||||
line[i] = 32 + rand() % 95;
|
line[i] = 32 + rand() % 95;
|
||||||
line[len - 2] = 13;
|
line[len - 2] = 13;
|
||||||
|
|||||||
Reference in New Issue
Block a user