summaryrefslogtreecommitdiffstats
path: root/adventure
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2003-09-19 10:01:53 +0000
committeritojun <itojun@NetBSD.org>2003-09-19 10:01:53 +0000
commitae341b55f180fd0e8185b075985a29b9f8007507 (patch)
treecd4850e2c4fe815fc631cab4dae0638fcfb2f87c /adventure
parent742773e212d99fd36e69f4888a502962b4560a1d (diff)
downloadbsdgames-darwin-ae341b55f180fd0e8185b075985a29b9f8007507.tar.gz
bsdgames-darwin-ae341b55f180fd0e8185b075985a29b9f8007507.tar.zst
bsdgames-darwin-ae341b55f180fd0e8185b075985a29b9f8007507.zip
off-by-one. aaron@openbsd
Diffstat (limited to 'adventure')
-rw-r--r--adventure/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/adventure/io.c b/adventure/io.c
index 20b4066c..33ae2fe3 100644
--- a/adventure/io.c
+++ b/adventure/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.14 2003/09/19 10:01:21 itojun Exp $ */
+/* $NetBSD: io.c,v 1.15 2003/09/19 10:01:53 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.14 2003/09/19 10:01:21 itojun Exp $");
+__RCSID("$NetBSD: io.c,v 1.15 2003/09/19 10:01:53 itojun Exp $");
#endif
#endif /* not lint */
@@ -302,7 +302,7 @@ rdesc(sect) /* read description-format msgs */
ptext[oldloc].txtlen = maystart - seekstart;
break;
case 6:/* random messages */
- if (oldloc > RTXSIZ)
+ if (oldloc >= RTXSIZ)
errx(1,"Too many random msgs");
rtext[oldloc].seekadr = seekhere;
rtext[oldloc].txtlen = maystart - seekstart;