summaryrefslogtreecommitdiffstats
path: root/hack
diff options
context:
space:
mode:
authorjnemeth <jnemeth@NetBSD.org>2006-03-30 01:25:52 +0000
committerjnemeth <jnemeth@NetBSD.org>2006-03-30 01:25:52 +0000
commit8c752b89df9807fb95147b6d7ca21ddf2d4a533d (patch)
treeba36089be878f491d9e6d559865eb06f309794eb /hack
parentf7632ca5f1d0c2bb51ed237d0306cf226b710c1a (diff)
downloadbsdgames-darwin-8c752b89df9807fb95147b6d7ca21ddf2d4a533d.tar.gz
bsdgames-darwin-8c752b89df9807fb95147b6d7ca21ddf2d4a533d.tar.zst
bsdgames-darwin-8c752b89df9807fb95147b6d7ca21ddf2d4a533d.zip
Coverity CID 1326: check for error return
Diffstat (limited to 'hack')
-rw-r--r--hack/hack.dog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hack/hack.dog.c b/hack/hack.dog.c
index 00dc575e..1e839c97 100644
--- a/hack/hack.dog.c
+++ b/hack/hack.dog.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.dog.c,v 1.6 2003/04/02 18:36:36 jsm Exp $ */
+/* $NetBSD: hack.dog.c,v 1.7 2006/03/30 01:25:52 jnemeth Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.dog.c,v 1.6 2003/04/02 18:36:36 jsm Exp $");
+__RCSID("$NetBSD: hack.dog.c,v 1.7 2006/03/30 01:25:52 jnemeth Exp $");
#endif /* not lint */
#include "hack.h"
@@ -366,6 +366,8 @@ dog_move(struct monst *mtmp, int after)
ny = poss[i].y;
if (info[i] & ALLOW_M) {
mtmp2 = m_at(nx, ny);
+ if (mtmp2 = NULL)
+ panic("error in dog_move");
if (mtmp2->data->mlevel >= mdat->mlevel + 2 ||
mtmp2->data->mlet == 'c')
continue;