summaryrefslogtreecommitdiff
path: root/games/quiz/quiz.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-08 09:32:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-08 09:32:39 +0000
commit49e4e209308a19b5940066684065108ba0334c02 (patch)
treee99071d42d4d7f501b40e2d7f72f01c4e6a41bb6 /games/quiz/quiz.c
parenta38aaa1825ec7c8ba9a296e3a701ba3215ecea86 (diff)
fixes; netbsd
Diffstat (limited to 'games/quiz/quiz.c')
-rw-r--r--games/quiz/quiz.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c
index bbd14de48a6..28eb3904aac 100644
--- a/games/quiz/quiz.c
+++ b/games/quiz/quiz.c
@@ -301,14 +301,21 @@ char *
next_cat(s)
register char * s;
{
+ int esc = 0;
+
for (;;)
switch (*s++) {
case '\0':
return (NULL);
case '\\':
+ esc = 1;
break;
case ':':
- return (s);
+ if (!esc)
+ return (s);
+ default:
+ esc = 0;
+ break;
}
/* NOTREACHED */
}