Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dll/steam_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ bool Steam_Utils::InitFilterText()
{
PRINT_DEBUG_TODO();
std::lock_guard<std::recursive_mutex> lock(global_mutex);
return false;
return true;
}

// Initializes text filtering.
Expand All @@ -384,7 +384,7 @@ bool Steam_Utils::InitFilterText( uint32 unFilterOptions )
{
PRINT_DEBUG_TODO();
std::lock_guard<std::recursive_mutex> lock(global_mutex);
return false;
return true;
}

// Filters the provided input message and places the filtered result into pchOutFilteredText.
Expand All @@ -411,16 +411,16 @@ int Steam_Utils::FilterText( ETextFilteringContext eContext, CSteamID sourceStea
{
PRINT_DEBUG_ENTRY();
std::lock_guard<std::recursive_mutex> lock(global_mutex);
if (!nByteSizeOutFilteredText) return 0;
unsigned len = static_cast<unsigned>(strlen(pchInputMessage));
if (!nByteSizeOutFilteredText || !pchInputMessage || !pchOutFilteredText) return 0;
size_t len = strlen(pchInputMessage);
if (!len) return 0;
len += 1;
if (len > nByteSizeOutFilteredText) len = nByteSizeOutFilteredText;
len -= 1;

memcpy(pchOutFilteredText, pchInputMessage, len);
pchOutFilteredText[len] = 0;
return len;
return 0; // NOTE: "Returns the number of characters (not bytes) filtered". Since all characters are copied, no characters are filtered.
}


Expand Down