dwrite: Account for position != 0 in fetch loops.

Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Esme Povirk 2021-12-11 14:04:28 -06:00 committed by Alexandre Julliard
parent 07fd82cdbd
commit fad8d49606
1 changed files with 2 additions and 2 deletions

View File

@ -875,7 +875,7 @@ static HRESULT get_text_source_ptr(IDWriteTextAnalysisSource *source, UINT32 pos
while (read < length && *text) { while (read < length && *text) {
*text = NULL; *text = NULL;
len = 0; len = 0;
hr = IDWriteTextAnalysisSource_GetTextAtPosition(source, read, text, &len); hr = IDWriteTextAnalysisSource_GetTextAtPosition(source, position+read, text, &len);
if (FAILED(hr)) if (FAILED(hr))
{ {
free(*buff); free(*buff);
@ -1019,7 +1019,7 @@ static HRESULT WINAPI dwritetextanalyzer_AnalyzeLineBreakpoints(IDWriteTextAnaly
while (read < length && text) { while (read < length && text) {
text = NULL; text = NULL;
len = 0; len = 0;
hr = IDWriteTextAnalysisSource_GetTextAtPosition(source, read, &text, &len); hr = IDWriteTextAnalysisSource_GetTextAtPosition(source, position+read, &text, &len);
if (FAILED(hr)) if (FAILED(hr))
goto done; goto done;
if (!text) if (!text)