mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
* The fix in r15551 was not entirely correct. Must handle the case when string ends with a single whitespace.
git-svn-id: trunk@15570 -
This commit is contained in:
parent
a872d84f72
commit
1a50f3ed26
@ -325,11 +325,12 @@ var
|
|||||||
DoIncJ: Boolean;
|
DoIncJ: Boolean;
|
||||||
begin
|
begin
|
||||||
Attr := nil;
|
Attr := nil;
|
||||||
i := 1;
|
i := 0;
|
||||||
while (i <= Length(s)) and not IsXMLWhitespace(s[i]) do
|
repeat
|
||||||
Inc(i);
|
Inc(i)
|
||||||
|
until (i > Length(s)) or IsXMLWhitespace(s[i]);
|
||||||
|
|
||||||
if i = Length(s) then
|
if i > Length(s) then
|
||||||
Result := s
|
Result := s
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -272,10 +272,12 @@ procedure TSAXXMLReader.EnterNewScannerContext(NewContext: TXMLScannerContext);
|
|||||||
DoIncJ: Boolean;
|
DoIncJ: Boolean;
|
||||||
begin
|
begin
|
||||||
Attr := nil;
|
Attr := nil;
|
||||||
i := 1;
|
i := 0;
|
||||||
while (i <= Length(s)) and not (s[i] in WhitespaceChars) do
|
repeat
|
||||||
Inc(i);
|
Inc(i)
|
||||||
if i = Length(s) then
|
until (i > Length(s)) or (s[i] in WhitespaceChars);
|
||||||
|
|
||||||
|
if i > Length(s) then
|
||||||
Result := LowerCase(s)
|
Result := LowerCase(s)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user