From ce6a6f86e9202b6542605255deb42567d84f4816 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 1 Oct 2017 00:38:13 +0300 Subject: Add assert to tell compiler wrong behaviour is UD --- src/fspec/bcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fspec/bcode.c b/src/fspec/bcode.c index 0a89260..0d0d3fd 100644 --- a/src/fspec/bcode.c +++ b/src/fspec/bcode.c @@ -97,7 +97,7 @@ fspec_arg_get_mem(const enum fspec_arg *arg, const void *data, struct fspec_mem fspec_num fspec_arg_get_num(const enum fspec_arg *arg) { - assert(arg); + assert(arg && *arg < FSPEC_ARG_LAST); fspec_num v; switch (*arg) { case FSPEC_ARG_NUM: -- cgit v1.2.3-70-g09d2