diff --git a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp index 03647089e3..70a61ff9ed 100644 --- a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp +++ b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp @@ -238,13 +238,21 @@ error_code getText(vm::ptr OutputInfo, bool is { osk->osk_text_old[i] = osk->osk_text[i]; - if (do_copy && i < OutputInfo->numCharsResultString) + if (do_copy) { - if (osk->osk_text[i] == 0) + if (i < OutputInfo->numCharsResultString) { + if (osk->osk_text[i] == 0) + { + do_copy = false; + } + OutputInfo->pResultString[i] = osk->osk_text[i]; + } + else + { + OutputInfo->pResultString[i] = 0; do_copy = false; } - OutputInfo->pResultString[i] = osk->osk_text[i]; } }