summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--opt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/opt.c b/opt.c
index 50ad212..f94e723 100644
--- a/opt.c
+++ b/opt.c
@@ -317,6 +317,8 @@ struct opt_state {
/** Log an optimization. */
BFS_FORMATTER(3, 4)
static bool debug_opt(const struct opt_state *state, int level, const char *format, ...) {
+ assert(state->ctx->optlevel >= level);
+
if (bfs_debug(state->ctx, DEBUG_OPT, "${cyn}-O%d${rs}: ", level)) {
va_list args;
va_start(args, format);