Subject: bin/862: canfield acts on rubbed out commands
To: None <gnats-admin@NetBSD.ORG>
From: None <jarle@idt.unit.no>
List: netbsd-bugs
Date: 03/11/1995 13:05:06
>Number: 862
>Category: bin
>Synopsis: canfield acts on rubbed out commands
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 11 13:05:04 1995
>Originator:
>Organization:
Free Hardware Foundation, UnLtd.
>Release: 1.0
>Environment:
System: NetBSD honey.idt.unit.no 1.0 NetBSD 1.0 (HONEY) #1: Wed Jan 25 23:40:45 MET 1995 jarle@honey.idt.unit.no:/local/NetBSD/src/sys/arch/i386/compile/HONEY i386
>Description:
Canfield will improperly act on commands that are entererd and subsequently
erased by the player.
>How-To-Repeat:
Play /usr/games/canfield. Enter a legal canfield move, and then backspace
over it and hit return. Canfield will now act on the rubbed out command,
instead of complaining about 'not a proper move'.
>Fix:
Apply diff.
================================================================
*** - Thu Jan 1 01:00:00 1970
--- canfield.c Sat Mar 11 21:43:40 1995
***************
*** 1266,1270 ****
char *cp;
{
! char cmd[2], ch;
int i;
--- 1266,1270 ----
char *cp;
{
! char cmd[2] = { '\0', '\0'}, ch;
int i;
***************
*** 1288,1296 ****
printw("\b \b");
refresh();
! i--;
} else if (ch == killchar() && i > 0) {
while (i > 0) {
printw("\b \b");
! i--;
}
refresh();
--- 1288,1296 ----
printw("\b \b");
refresh();
! cmd[--i] = '\0';
} else if (ch == killchar() && i > 0) {
while (i > 0) {
printw("\b \b");
! cmd[--i] = '\0';
}
refresh();
================================================================
-jarle
----
"Whenever you're holding all the cards why does everyone else turn
out to be playing chess?"
>Audit-Trail:
>Unformatted: