From 04c5e41eff802063fbe58028f221efedfbeb6989 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 18 Sep 2022 14:13:02 +0300 Subject: [PATCH 1/2] cellImeJp: fix regression --- rpcs3/Emu/Cell/Modules/cellImeJp.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellImeJp.cpp b/rpcs3/Emu/Cell/Modules/cellImeJp.cpp index adff53e320b2..cfa79a0e9086 100644 --- a/rpcs3/Emu/Cell/Modules/cellImeJp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellImeJp.cpp @@ -43,9 +43,17 @@ bool ime_jp_manager::addChar(u16 c) if (!c || cursor >= (CELL_IMEJP_STRING_MAXLENGTH - 1) || cursor > input_string.length()) return false; - input_string += c; // resize - std::memmove(input_string.data() + cursor + 1, input_string.data() + cursor, sizeof(u16) * (input_string.size() - 1 - cursor)); - cursor_end = ++cursor; + std::u16string tmp; + tmp += c; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + input_string.insert(cursor++, tmp); +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + cursor_end = cursor; input_state = CELL_IMEJP_BEFORE_CONVERT; return true; } From 5a21f141746930aa54d4344300bda49cab7f116a Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 18 Sep 2022 15:30:19 +0300 Subject: [PATCH 2/2] Fix one more warning --- rpcs3/Emu/RSX/Common/surface_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Common/surface_utils.h b/rpcs3/Emu/RSX/Common/surface_utils.h index 993933d19d5f..c1d31b5df1b4 100644 --- a/rpcs3/Emu/RSX/Common/surface_utils.h +++ b/rpcs3/Emu/RSX/Common/surface_utils.h @@ -557,7 +557,7 @@ namespace rsx ensure(dst_offset.x < child_w && dst_offset.y < child_h); // TODO: Eventually need to stack all the overlapping regions, but for now just do the latest rect in the space - deferred_clipped_region region; + deferred_clipped_region region{}; region.src_x = src_offset.x; region.src_y = src_offset.y; region.dst_x = dst_offset.x;