diff --git a/lcftrans/src/utils.cpp b/lcftrans/src/utils.cpp index 4c89dcc..7f80e89 100644 --- a/lcftrans/src/utils.cpp +++ b/lcftrans/src/utils.cpp @@ -90,9 +90,10 @@ std::string Utils::LowerCase(const std::string& in) { } std::string Utils::RemoveControlChars(std::string_view s) { - // RPG_RT ignores any control characters within messages. + // RPG_RT ignores C0 control characters (0x00-0x1F) within messages. + // Keep DEL (0x7F) because some games use it as a meaningful message prefix. std::string out = lcf::ToString(s); - auto iter = std::remove_if(out.begin(), out.end(), [](const char ch) { return (ch >= 0x0 && ch <= 0x1F) || ch == 0x7F; }); + auto iter = std::remove_if(out.begin(), out.end(), [](const char ch) { return ch >= 0x0 && ch <= 0x1F; }); out.erase(iter, out.end()); return out; }