]> git.cameronkatri.com Git - bsdgames-darwin.git/commitdiff
off-by-one. aaron@openbsd
authoritojun <itojun@NetBSD.org>
Fri, 19 Sep 2003 10:01:21 +0000 (10:01 +0000)
committeritojun <itojun@NetBSD.org>
Fri, 19 Sep 2003 10:01:21 +0000 (10:01 +0000)
adventure/io.c

index 169a68e1d754813e0e8dde107aa976a6a2aa642f..20b4066c6a9d8c42f22d35f65be739836f842ee2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: io.c,v 1.13 2003/08/07 09:36:50 agc Exp $      */
+/*     $NetBSD: io.c,v 1.14 2003/09/19 10:01:21 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.13 2003/08/07 09:36:50 agc Exp $");
+__RCSID("$NetBSD: io.c,v 1.14 2003/09/19 10:01:21 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -313,7 +313,7 @@ rdesc(sect)                 /* read description-format msgs */
                                cval[clsses++] = oldloc;
                                break;
                        case 12:        /* magic messages               */
-                               if (oldloc > MAGSIZ)
+                               if (oldloc >= MAGSIZ)
                                        errx(1,"Too many magic msgs");
                                mtext[oldloc].seekadr = seekhere;
                                mtext[oldloc].txtlen = maystart - seekstart;