usp10: Use memcpy() to return ScriptLayout() results.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9c98d63277
commit
a8c6c9f49a
|
@ -3645,7 +3645,6 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
|
|||
if (!indexs)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
||||
if (vistolog)
|
||||
{
|
||||
for( ich = 0; ich < runs; ich++)
|
||||
|
@ -3654,11 +3653,9 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
|
|||
ich = 0;
|
||||
while (ich < runs)
|
||||
ich += BIDI_ReorderV2lLevel(0, indexs+ich, level+ich, runs - ich, FALSE);
|
||||
for (ich = 0; ich < runs; ich++)
|
||||
vistolog[ich] = indexs[ich];
|
||||
memcpy(vistolog, indexs, runs * sizeof(*vistolog));
|
||||
}
|
||||
|
||||
|
||||
if (logtovis)
|
||||
{
|
||||
for( ich = 0; ich < runs; ich++)
|
||||
|
@ -3667,8 +3664,7 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
|
|||
ich = 0;
|
||||
while (ich < runs)
|
||||
ich += BIDI_ReorderL2vLevel(0, indexs+ich, level+ich, runs - ich, FALSE);
|
||||
for (ich = 0; ich < runs; ich++)
|
||||
logtovis[ich] = indexs[ich];
|
||||
memcpy(logtovis, indexs, runs * sizeof(*logtovis));
|
||||
}
|
||||
heap_free(indexs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue