OCT 1. log模块不能识别时,使用默认模块

This commit is contained in:
huangxin 2023-02-06 15:28:28 +08:00
parent 2d899474b0
commit b809776b7c
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ static ZLOG_MODULE g_zlogModule[] = {
}; };
zlog_category_t *zlog_get_mod_cat(ZLOG_MOD_NAME logMod) { zlog_category_t *zlog_get_mod_cat(ZLOG_MOD_NAME logMod) {
if (logMod >= ZLOG_MOD_MAX) { if (logMod >= ZLOG_MOD_MAX || logMod < 0) {
logMod = ZLOG_MOD_MAIN; logMod = ZLOG_MOD_MAIN;
} }