* Fix bug #28818, patch from Alexey Torgashin

git-svn-id: trunk@32001 -
This commit is contained in:
michael 2015-10-10 10:37:00 +00:00
parent ebf535e7a3
commit e8a4b6c820

View File

@ -353,9 +353,7 @@ begin
end;
end;
SectionLength := TokenStr - TokenStart;
SetLength(FCurTokenString, SectionLength);
if SectionLength > 0 then
Move(TokenStart^, FCurTokenString[1], SectionLength);
SetString(FCurTokenString, TokenStart, SectionLength);
If (FCurTokenString[1]='.') then
FCurTokenString:='0'+FCurTokenString;
Result := tkNumber;
@ -393,9 +391,7 @@ begin
Case Tokenstr[0] of
'/' : begin
SectionLength := Length(FCurLine)- (TokenStr - PChar(FCurLine));
SetLength(FCurTokenString,SectionLength);
if SectionLength > 0 then
Move(TokenStart^, FCurTokenString[1], SectionLength);
SetString(FCurTokenString, TokenStart, SectionLength);
Fetchline;
end;
'*' :
@ -407,9 +403,8 @@ begin
if (TokenStr[0]=#0) then
begin
SectionLength := (TokenStr - TokenStart);
SetLength(S,SectionLength);
if SectionLength > 0 then
Move(TokenStart^, S[1], SectionLength);
SetString(S, TokenStart, SectionLength);
FCurtokenString:=FCurtokenString+S;
if not fetchLine then
Error(SUnterminatedComment, [CurRow,CurCOlumn,TokenStr[0]]);
@ -422,9 +417,7 @@ begin
if EOC then
begin
SectionLength := (TokenStr - TokenStart-1);
SetLength(S,SectionLength);
if SectionLength > 0 then
Move(TokenStart^, S[1], SectionLength);
SetString(S, TokenStart, SectionLength);
FCurtokenString:=FCurtokenString+S;
Inc(TokenStr);
end;
@ -441,9 +434,7 @@ begin
Inc(TokenStr);
until not (TokenStr[0] in ['A'..'Z', 'a'..'z', '0'..'9', '_']);
SectionLength := TokenStr - TokenStart;
SetLength(FCurTokenString, SectionLength);
if SectionLength > 0 then
Move(TokenStart^, FCurTokenString[1], SectionLength);
SetString(FCurTokenString, TokenStart, SectionLength);
for it := tkTrue to tkNull do
if CompareText(CurTokenString, TokenInfos[it]) = 0 then
begin