Skip to content

Commit

Permalink
Updated c_virtual_keyboard_task
Browse files Browse the repository at this point in the history
  • Loading branch information
twist84 committed Dec 11, 2024
1 parent 26eb7e2 commit cbb7527
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions game/source/networking/online/online_guide_pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ void __cdecl c_virtual_keyboard_task::set_controller_index(e_controller_index co
void __cdecl c_virtual_keyboard_task::set_default_text(wchar_t const* default_text)
{
if (default_text)
wcscpy_s(m_default_text, default_text);
ustrnzcpy(m_default_text, default_text, 256);
else
m_default_text[0] = 0;
}

void __cdecl c_virtual_keyboard_task::set_description_text(wchar_t const* description_text)
{
if (description_text)
wcscpy_s(m_description_text, description_text);
ustrnzcpy(m_description_text, description_text, 64);
else
m_description_text[0] = 0;
}

void __cdecl c_virtual_keyboard_task::set_title_text(wchar_t const* title_text)
{
if (title_text)
wcscpy_s(m_title_text, title_text);
ustrnzcpy(m_title_text, title_text, 64);
else
m_title_text[0] = 0;
}
Expand Down Expand Up @@ -252,8 +252,8 @@ void __thiscall c_virtual_keyboard_task::_success(dword return_result)

//c_overlapped_task::success(return_result);

if (!wcsncmp(m_result_text, L".fortune", 9))
wcsncpy_s(m_result_text, L"My modem is on file", 256);
if (!ustrncmp(m_result_text, L".fortune", 9))
ustrnzcpy(m_result_text, L"My modem is on file", 256);

wchar_string_sanitize_for_game(m_result_text, 256);
}
Expand Down

0 comments on commit cbb7527

Please # to comment.