Permalink
Browse files

[libcmyth] Fix the debug output so debug statements at the current le…

…vel are logged.

Prior to this change DEBUG statements wouldn't be output if the logging level was set to DEBUG.
  • Loading branch information...
1 parent 57e4cdb commit 052d1ab41fd331fbbbb45df52beee056618c0cf9 David Teirney committed May 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cmyth/include/debug.h
@@ -54,7 +54,7 @@ mvp_dbg(mvp_debug_ctx_t *ctx, int level, char *fmt, va_list ap)
return;
}
if ((ctx->selector && ctx->selector(level, ctx->cur_level)) ||
- (!ctx->selector && (level < ctx->cur_level))) {
+ (!ctx->selector && (level <= ctx->cur_level))) {
len = snprintf(msg, sizeof(msg), "(%s)", ctx->name);
vsnprintf(msg + len, sizeof(msg)-len, fmt, ap);
if (ctx->msg_callback) {

0 comments on commit 052d1ab

Please sign in to comment.