mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-01 10:23:40 +02:00
win32: DrawText: fix output string length for DT_MODIFYSTRING
git-svn-id: trunk@52709 -
This commit is contained in:
parent
c66e4799fa
commit
f12bbaea40
@ -1116,6 +1116,7 @@ begin
|
||||
Result := Windows.DrawTextW(DC, PWideChar(W), len, @Rect, Flags);
|
||||
if (Flags and DT_MODIFYSTRING <> 0) then
|
||||
begin
|
||||
W := WideString(PWideChar(W)); // trim to first #0
|
||||
s := UTF16ToUTF8(W);
|
||||
if s<>'' then
|
||||
Move(s[1], Str^, Length(s)+1) // the programmer has to make sure there's enough space in Str
|
||||
|
Loading…
Reference in New Issue
Block a user