mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
cellImeJp: fix regression
This commit is contained in:
parent
a1aebdc5d6
commit
c86ddb3b7d
@ -43,9 +43,17 @@ bool ime_jp_manager::addChar(u16 c)
|
|||||||
if (!c || cursor >= (CELL_IMEJP_STRING_MAXLENGTH - 1) || cursor > input_string.length())
|
if (!c || cursor >= (CELL_IMEJP_STRING_MAXLENGTH - 1) || cursor > input_string.length())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
input_string += c; // resize
|
std::u16string tmp;
|
||||||
std::memmove(input_string.data() + cursor + 1, input_string.data() + cursor, sizeof(u16) * (input_string.size() - 1 - cursor));
|
tmp += c;
|
||||||
cursor_end = ++cursor;
|
#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;
|
input_state = CELL_IMEJP_BEFORE_CONVERT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user