From 9c99a57e1f1bb6ba6764d4f53f0cb971a31594fc Mon Sep 17 00:00:00 2001 From: jnemeth Date: Thu, 30 Mar 2006 01:32:27 +0000 Subject: Coverity CID 1327: check for error return --- hack/hack.shk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hack/hack.shk.c') 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 #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 @@ -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); -- cgit v1.2.3-56-ge451