fuzzer tweak tweak

Recent fuzzer tweak had an unintended side-effect:  NUL character is
used to indicate a mouse click and we weren't setting up fake value
for one of those.  Go back to avoiding NUL when obtaining a random
value for user's keystroke.
This commit is contained in:
PatR
2019-06-20 00:53:45 -07:00
parent 1c03d09701
commit 3ea0cc1483

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1560789049 2019/06/17 16:30:49 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.336 $ */
/* NetHack 3.6 cmd.c $NHDT-Date: 1561017215 2019/06/20 07:53:35 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.337 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -4572,7 +4572,8 @@ randomkey()
c = (char) rn1('9' - '0' + 1, '0');
break;
case 14:
c = (char) rn2(iflags.wc_eight_bit_input ? 256 : 128);
/* any char, but avoid '\0' because it's used for mouse click */
c = (char) rnd(iflags.wc_eight_bit_input ? 255 : 127);
break;
}