From 18930081cef661cd1ec576aac712e21432220c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Wed, 20 Jun 2012 18:42:19 +0000 Subject: [PATCH] process_vertical_faces(): Explicitly assert that "direction" is zero or one only. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bård Skaflestad --- preprocess.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/preprocess.c b/preprocess.c index b38b2039..60ef6720 100644 --- a/preprocess.c +++ b/preprocess.c @@ -219,6 +219,8 @@ process_vertical_faces(int direction, int *ptr; int len; + assert ((direction == 0) || (direction == 1)); + d[0] = 2 * (nx + 0); d[1] = 2 * (ny + 0); d[2] = 2 * (nz + 1);