* fixed crash when reading properties which values are one char

* fixed crash when property values are empty

git-svn-id: trunk@17848 -
This commit is contained in:
andrew 2008-12-16 04:44:02 +00:00
parent e966b41e53
commit 332993241d

View File

@ -558,6 +558,7 @@ var
begin begin
Result := TStringList.Create; Result := TStringList.Create;
Start := Pos(':', ACommand)+1; Start := Pos(':', ACommand)+1;
ACommand := ACommand + ' ';
WantArg := True; WantArg := True;
@ -757,9 +758,15 @@ begin
Command := LowerCase(GetCommandName(ACommand)); Command := LowerCase(GetCommandName(ACommand));
if Command = 'color' then if Command = 'color' then
Color := ColorFromString(Args[0]) if Args.Count > 0 then
Color := ColorFromString(Args[0])
else
Color := clDefault
else if Command = 'background-color' then else if Command = 'background-color' then
BGColor := ColorFromString(Args[0]) if Args.Count > 0 then
BGColor := ColorFromString(Args[0])
else
BGColor := clDefault
else if Command = 'background' then else if Command = 'background' then
begin begin
if Args.Count > 0 then BGColor := ColorFromString(Args[0]); if Args.Count > 0 then BGColor := ColorFromString(Args[0]);