--- lbbs/src/user_stat.c 2025/10/23 04:09:33 1.1 +++ lbbs/src/user_stat.c 2025/10/24 02:07:01 1.3 @@ -74,14 +74,19 @@ int user_stat_map_update(USER_STAT_MAP * log_error("article_block_find_by_index(index=%d) error\n", i); break; } + + if (p_article->visible == 0) + { + continue; + } if (p_article->uid > p_map->last_uid) { #ifdef _DEBUG - log_error("uid=%d of article(aid=%d) is greater than last_uid=%d, waiting for next user list update\n", + log_error("uid=%d of article(aid=%d) is greater than last_uid=%d\n", p_article->uid, p_article->aid, p_map->last_uid); #endif - break; + continue; } if (user_stat_article_cnt_inc(p_map, p_article->uid, 1) < 0) @@ -116,7 +121,7 @@ int user_stat_article_cnt_inc(USER_STAT_ mid = (left + right) / 2; if (uid < p_map->stat_list[mid].uid) { - right = mid; + right = mid - 1; } else if (uid > p_map->stat_list[mid].uid) { @@ -158,7 +163,7 @@ int user_stat_get(USER_STAT_MAP *p_map, mid = (left + right) / 2; if (uid < p_map->stat_list[mid].uid) { - right = mid; + right = mid - 1; } else if (uid > p_map->stat_list[mid].uid) {