mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-09-18 15:32:33 +00:00
cellOskDialogUnloadAsync: guarantee 0 terminated return string
This commit is contained in:
parent
fce9f352a9
commit
d7cc97433d
1 changed files with 11 additions and 3 deletions
|
@ -238,13 +238,21 @@ error_code getText(vm::ptr<CellOskDialogCallbackReturnParam> OutputInfo, bool is
|
||||||
{
|
{
|
||||||
osk->osk_text_old[i] = osk->osk_text[i];
|
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;
|
do_copy = false;
|
||||||
}
|
}
|
||||||
OutputInfo->pResultString[i] = osk->osk_text[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue