mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-01-05 08:10:04 +01:00
cellOskDialogUnloadAsync: guarantee 0 terminated return string
This commit is contained in:
parent
fce9f352a9
commit
d7cc97433d
|
|
@ -238,13 +238,21 @@ error_code getText(vm::ptr<CellOskDialogCallbackReturnParam> 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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue