uqs's projects
/
games.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
19c302a
)
hangman(6): Ignore case in the word list.
author
Sascha Wildner <saw@online.de>
Thu, 24 Jun 2010 08:53:10 +0000 (10:53 +0200)
committer
Sascha Wildner <saw@online.de>
Thu, 24 Jun 2010 08:53:10 +0000 (10:53 +0200)
Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1787>
games/hangman/getguess.c
patch
|
blob
|
blame
|
history
diff --git
a/games/hangman/getguess.c
b/games/hangman/getguess.c
index
b5b60c0
..
c399029
100644
(file)
--- a/
games/hangman/getguess.c
+++ b/
games/hangman/getguess.c
@@
-42,7
+42,7
@@
void
getguess(void)
{
int i;
- int ch;
+ int ch, uch;
bool correct;
leaveok(stdscr, FALSE);
@@
-70,10
+70,14
@@
getguess(void)
Guessed[ch - 'a'] = TRUE;
correct = FALSE;
+ uch = toupper(ch);
for (i = 0; Word[i] != '\0'; i++) {
if (Word[i] == ch) {
Known[i] = ch;
correct = TRUE;
+ } else if (Word[i] == uch) {
+ Known[i] = uch;
+ correct = TRUE;
}
}
if (!correct)