--- lbbs/src/article_post.c 2025/06/14 11:58:00 1.10 +++ lbbs/src/article_post.c 2025/06/14 11:59:09 1.11 @@ -976,7 +976,8 @@ int article_reply(const SECTION_LIST *p_ "INSERT INTO bbs(SID, TID, UID, username, nickname, title, CID, transship, " "sub_dt, sub_ip, reply_note, exp, last_reply_dt, icon, length) " "VALUES(%d, %d, %d, '%s', '%s', '%s', %d, 0, NOW(), '%s', 1, %d, NOW(), 1, %ld)", - p_section->sid, p_article->aid, BBS_priv.uid, BBS_username, nickname_f, title_f, + p_section->sid, (p_article->tid == 0 ? p_article->aid : p_article->tid), + BBS_priv.uid, BBS_username, nickname_f, title_f, p_article_new->cid, hostaddr_client, BBS_user_exp, len_content); if (mysql_query(db, sql) != 0)