fix: 'Copy Session Info' button not working (#1855)

This commit is contained in:
Londiuh 2023-07-26 18:24:00 +02:00 committed by GitHub
parent 31c601658f
commit f4a89e36db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ namespace big
components::button("COPY_SESSION_INFO"_T, [] { components::button("COPY_SESSION_INFO"_T, [] {
char buf[0x100]{}; char buf[0x100]{};
g_pointers->m_gta.m_encode_session_info(&gta_util::get_network()->m_game_session.m_rline_session.m_session_info, buf, 0xA9, nullptr); g_pointers->m_gta.m_encode_session_info(&gta_util::get_network()->m_last_joined_session.m_session_info, buf, 0xA9, nullptr);
ImGui::SetClipboardText(buf); ImGui::SetClipboardText(buf);
}); });

View File

@ -17,7 +17,7 @@ namespace big
{ {
static char name_buf[32]; static char name_buf[32];
static char search[64]; static char search[64];
static char session_info[255]; static char session_info[0x100]{};
ImGui::Text(std::format("Total sessions found: {}", g_matchmaking_service->get_num_found_sessions()).data()); ImGui::Text(std::format("Total sessions found: {}", g_matchmaking_service->get_num_found_sessions()).data());
@ -37,7 +37,7 @@ namespace big
if (components::selectable(std::to_string(session.info.m_session_token), i == selected_session_idx)) if (components::selectable(std::to_string(session.info.m_session_token), i == selected_session_idx))
{ {
selected_session_idx = i; selected_session_idx = i;
g_pointers->m_gta.m_encode_session_info(&session.info, session_info, 0x7D, nullptr); g_pointers->m_gta.m_encode_session_info(&session.info, session_info, 0xA9, nullptr);
} }
if (ImGui::IsItemHovered()) if (ImGui::IsItemHovered())