diff --git a/src/single_window/local_peer_window.cpp b/src/single_window/local_peer_window.cpp index bc34ba4..192efe7 100644 --- a/src/single_window/local_peer_window.cpp +++ b/src/single_window/local_peer_window.cpp @@ -15,7 +15,7 @@ int Render::LocalWindow() { ImGui::SetWindowFontScale(1.0f); ImGui::Text( - localization::local_desktop[localization_language_index_].c_str()); + "%s", localization::local_desktop[localization_language_index_].c_str()); ImGui::Spacing(); { @@ -25,7 +25,8 @@ int Render::LocalWindow() { ImGuiChildFlags_Border); { ImGui::SetWindowFontScale(0.5f); - ImGui::Text(localization::local_id[localization_language_index_].c_str()); + ImGui::Text("%s", + localization::local_id[localization_language_index_].c_str()); ImGui::Spacing(); @@ -41,7 +42,8 @@ int Render::LocalWindow() { ImGui::SetWindowFontScale(0.5f); - ImGui::Text(localization::password[localization_language_index_].c_str()); + ImGui::Text("%s", + localization::password[localization_language_index_].c_str()); strncpy(input_password_tmp_, input_password_, sizeof(input_password_)); ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH); diff --git a/src/single_window/remote_peer_window.cpp b/src/single_window/remote_peer_window.cpp index 84123fd..0e6ea9a 100644 --- a/src/single_window/remote_peer_window.cpp +++ b/src/single_window/remote_peer_window.cpp @@ -17,7 +17,7 @@ int Render::RemoteWindow() { ImGui::SetWindowFontScale(1.0f); ImGui::Text( - localization::remote_desktop[localization_language_index_].c_str()); + "%s", localization::remote_desktop[localization_language_index_].c_str()); ImGui::Spacing(); @@ -27,7 +27,8 @@ int Render::RemoteWindow() { ImGuiChildFlags_Border); { ImGui::SetWindowFontScale(0.5f); - ImGui::Text(localization::remote_id[localization_language_index_].c_str()); + ImGui::Text("%s", + localization::remote_id[localization_language_index_].c_str()); ImGui::Spacing(); ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH); diff --git a/src/single_window/setting_button.cpp b/src/single_window/setting_button.cpp index 5e4254e..f0ebcde 100644 --- a/src/single_window/setting_button.cpp +++ b/src/single_window/setting_button.cpp @@ -62,7 +62,8 @@ int Render::SettingButton() { localization::language_en[localization_language_index_].c_str()}; ImGui::SetCursorPosY(32); - ImGui::Text(localization::language[localization_language_index_].c_str()); + ImGui::Text("%s", + localization::language[localization_language_index_].c_str()); if (ConfigCenter::LANGUAGE::CHINESE == localization_language_) { ImGui::SetCursorPosX(LANGUAGE_SELECT_WINDOW_PADDING_CN); } else { @@ -88,6 +89,7 @@ int Render::SettingButton() { ImGui::SetCursorPosY(62); ImGui::Text( + "%s", localization::video_quality[localization_language_index_].c_str()); if (ConfigCenter::LANGUAGE::CHINESE == localization_language_) { @@ -111,8 +113,8 @@ int Render::SettingButton() { ImGui::SetCursorPosY(92); ImGui::Text( - localization::video_encode_format[localization_language_index_] - .c_str()); + "%s", localization::video_encode_format[localization_language_index_] + .c_str()); if (ConfigCenter::LANGUAGE::CHINESE == localization_language_) { ImGui::SetCursorPosX(VIDEO_ENCODE_FORMAT_SELECT_WINDOW_PADDING_CN); @@ -131,9 +133,9 @@ int Render::SettingButton() { { ImGui::SetCursorPosY(122); - ImGui::Text(localization::enable_hardware_video_codec - [localization_language_index_] - .c_str()); + ImGui::Text("%s", localization::enable_hardware_video_codec + [localization_language_index_] + .c_str()); if (ConfigCenter::LANGUAGE::CHINESE == localization_language_) { ImGui::SetCursorPosX(ENABLE_HARDWARE_VIDEO_CODEC_CHECKBOX_PADDING_CN);