throw assertions due to per-file-error not being properly set in mmsg().
This is reasonable behaviour (we shouldn't be able to ignore FATAL after
all). Thus, make sure wlevel is sanitised.
-/* $Id: read.c,v 1.9 2011/04/03 10:05:37 kristaps Exp $ */
+/* $Id: read.c,v 1.10 2011/04/03 10:11:25 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
{
struct mparse *curp;
+ assert(wlevel <= MANDOCLEVEL_FATAL);
+
curp = mandoc_calloc(1, sizeof(struct mparse));
curp->wlevel = wlevel;