Changes to get fuzzer working in NetHackW.

This commit is contained in:
Bart House
2018-12-12 21:46:14 -08:00
parent ce7c9d5077
commit 0cd50847fb
13 changed files with 121 additions and 20 deletions

View File

@@ -4421,6 +4421,27 @@ randomkey()
return c;
}
void random_response(char * buf, int size)
{
int count = 0;
while (1) {
char c = randomkey();
if (c == '\n')
break;
if (c == '\033') {
count = 0;
break;
}
if (count < size)
buf[count++] = c;
}
buf[count] = '\0';
}
int
ch2spkeys(c, start, end)
char c;