diff options
author | jnemeth <jnemeth@NetBSD.org> | 2006-03-30 01:32:27 +0000 |
---|---|---|
committer | jnemeth <jnemeth@NetBSD.org> | 2006-03-30 01:32:27 +0000 |
commit | 9c99a57e1f1bb6ba6764d4f53f0cb971a31594fc (patch) | |
tree | 3ab1f3759d058ab50dfd49b1a15a01a8a7b8ce49 /hack | |
parent | 2ecbb982b34047188a30b350ca10c8846fc85c3e (diff) | |
download | bsdgames-darwin-9c99a57e1f1bb6ba6764d4f53f0cb971a31594fc.tar.gz bsdgames-darwin-9c99a57e1f1bb6ba6764d4f53f0cb971a31594fc.tar.zst bsdgames-darwin-9c99a57e1f1bb6ba6764d4f53f0cb971a31594fc.zip |
Coverity CID 1327: check for error return
Diffstat (limited to 'hack')
-rw-r--r-- | hack/hack.shk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hack/hack.shk.c b/hack/hack.shk.c index ee066530..6f6abc45 100644 --- a/hack/hack.shk.c +++ b/hack/hack.shk.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.shk.c,v 1.7 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: hack.shk.c,v 1.8 2006/03/30 01:32:27 jnemeth Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.shk.c,v 1.7 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: hack.shk.c,v 1.8 2006/03/30 01:32:27 jnemeth Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -1100,6 +1100,8 @@ notonl_ok: if (nix != omx || niy != omy) { if (info[chi] & ALLOW_M) { mtmp = m_at(nix, niy); + if (mtmp == NULL) + panic("error in shk_move"); if (hitmm(shkp, mtmp) == 1 && rn2(3) && hitmm(mtmp, shkp) == 2) return (2); |