NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/58828: Fish allows guesses that are not in the player's hand.
>Number: 58828
>Category: bin
>Synopsis: Fish allows guesses that are not in the player's hand.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Nov 17 19:25:00 +0000 2024
>Originator: Aran Clauson
>Release: 10.99.10
>Organization:
None
>Environment:
NetBSD owl 10.99.10 NetBSD 10.99.10 (OWL) #0: Mon Jun 17 17:52:11 PDT 2024 root@owl:/root/obj/sys/arch/amd64/compile/OWL amd64
>Description:
Fish allows the user to guess cards that are not in the player's hand. Further, fish allows the user to "guess" cards that the opponent has already completed a book: the user can steal books of cards.
This bug was introduced in 2018 while preventing the user from requesting cards for which they have already made a book. However, this change removed the check for having at least one card of that rank.
>How-To-Repeat:
Run fish and ask for a card that is not in your hand.
>Fix:
Index: fish.c
===================================================================
RCS file: /cvsroot/src/games/fish/fish.c,v
retrieving revision 1.27
diff -u -r1.27 fish.c
--- fish.c 25 Jul 2021 02:00:42 -0000 1.27
+++ fish.c 17 Nov 2024 19:13:00 -0000
@@ -188,7 +188,7 @@
continue;
}
n = p - cards;
- if (userhand[n] <= 3) {
+ if (1 <= userhand[n] && userhand[n] <= 4) {
userasked[n] = 1;
return(n);
}
Home |
Main Index |
Thread Index |
Old Index