Qt5, Qt6: Initialize MaxCount in GetTextExtentInfo().Patch by Alexander Koblov. issue

(cherry picked from commit 720fc1261d)

Co-authored-by: Željan Rikalo <zeljko@lazarus-ide.org>
This commit is contained in:
Željan Rikalo 2024-04-30 13:16:07 +00:00 committed by Željan Rikalo
parent 88046c217e
commit 7a0060b726
2 changed files with 6 additions and 2 deletions
lcl/interfaces

View File

@ -4231,7 +4231,8 @@ begin
else
if Size.cx < MaxWidth then
MaxCount^ := AMaxCount
else
else begin
MaxCount^ := 0;
for i := 0 to AMaxCount - 1 do
begin
QString_at(AQtStr, @WC, I);
@ -4242,6 +4243,7 @@ begin
else
break;
end;
end;
end;
end else
begin

View File

@ -4246,7 +4246,8 @@ begin
else
if Size.cx < MaxWidth then
MaxCount^ := AMaxCount
else
else begin
MaxCount^ := 0;
for i := 0 to AMaxCount - 1 do
begin
QString_at(AQtStr, @WC, I);
@ -4257,6 +4258,7 @@ begin
else
break;
end;
end;
end;
end else
begin