You've already forked lazarus-ccr
thtmlport: Fixes a crash
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1922 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -651,10 +651,14 @@ begin
|
||||
if cchMultiByte < 0 then {Null terminated?}
|
||||
s := lpMultiByteStr
|
||||
else
|
||||
begin
|
||||
if lpMultiByteStr = nil then s := ''
|
||||
else
|
||||
begin
|
||||
SetLength(s, cchMultiByte);
|
||||
Move(lpMultiByteStr^, s[1], cchMultiByte);
|
||||
SetLength(s, cchMultiByte);
|
||||
Move(lpMultiByteStr^, s[1], cchMultiByte);
|
||||
end;
|
||||
end;
|
||||
if CodePage = CP_UTF8 then
|
||||
begin
|
||||
w := UTF8Decode(s);
|
||||
|
@ -693,12 +693,11 @@ var
|
||||
ExtS: TSize;
|
||||
Ints: ^Integers;
|
||||
L, H, I: integer;
|
||||
|
||||
begin
|
||||
Extent := 0;
|
||||
Result := 0;
|
||||
if (Width <= 0) or (Max = 0) then
|
||||
Exit;
|
||||
Extent := 0;
|
||||
Result := 0;
|
||||
if (Width <= 0) or (Max = 0) then
|
||||
Exit;
|
||||
|
||||
{$IFDEF MSWINDOWS} //Only compile if GetTextExtentExPointW exists
|
||||
if not IsWin32Platform then
|
||||
|
@ -2438,13 +2438,12 @@ if ColorStrings = nil then
|
||||
end;
|
||||
end;
|
||||
|
||||
function ColorFromString(S: string; NeedPound: boolean; var Color: TColor): boolean;
|
||||
{Translate StyleSheet color string to Color. If NeedPound is true, a '#' sign
|
||||
is required to preceed a hexidecimal value.}
|
||||
function ColorFromString(S: string; NeedPound: boolean; var Color: TColor): boolean;
|
||||
const
|
||||
LastS: string = '?&%@';
|
||||
LastColor: TColor = 0;
|
||||
|
||||
var
|
||||
I, Rd, Bl: integer;
|
||||
S1: string;
|
||||
|
Reference in New Issue
Block a user