From 272d63d75b2265e9e6dee6ebf760c5d1b8a2351f Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Fri, 4 Sep 2026 22:14:57 +0700 Subject: [PATCH] [saco] Implement/match `CChatWindow::ReplaceControlChars`; its range test is signed, unlike the `ReplaceUnprintableChars` in `game/util.cpp` --- saco/chatwindow.cpp | 15 +++++++++++++++ saco/chatwindow.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/saco/chatwindow.cpp b/saco/chatwindow.cpp index 9c09efa..d2a50ca 100644 --- a/saco/chatwindow.cpp +++ b/saco/chatwindow.cpp @@ -184,3 +184,18 @@ void CChatWindow::SetPageSize(int iPageSize) m_bRedraw = 1; } } + +//---------------------------------------------------- + +void CChatWindow::ReplaceControlChars(char *szString) +{ + if(*szString) + { + do + { + if(*szString > 0 && *szString < 32) + *szString = 32; + } + while(*++szString); + } +} diff --git a/saco/chatwindow.h b/saco/chatwindow.h index b7fc7c9..9a9e12b 100644 --- a/saco/chatwindow.h +++ b/saco/chatwindow.h @@ -51,6 +51,8 @@ public: void FUNC_10067200(); + void ReplaceControlChars(char *szString); // .text:10067420 + void FUNC_10067E00(); // .text:10067E00 void FUNC_10067ED0(); // .text:10067ED0