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:
Nikolay Sivov 2016-02-10 13:09:44 +03:00 committed by Alexandre Julliard
parent 9c98d63277
commit a8c6c9f49a
1 changed files with 2 additions and 6 deletions

View File

@ -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);