mirror of https://gitlab.com/basile.b/dexed.git
fix, UB in HL due to white attribs not always defined after skipping white chars
This commit is contained in:
parent
28f9e86b84
commit
5fb7e718ae
|
|
@ -240,7 +240,8 @@ const
|
||||||
cmpRes: array[boolean] of integer = (-1, 1);
|
cmpRes: array[boolean] of integer = (-1, 1);
|
||||||
begin
|
begin
|
||||||
result := inherited Compare(Range);
|
result := inherited Compare(Range);
|
||||||
if result <> 0 then exit;
|
assert(Range <> nil);
|
||||||
|
{if result <> 0 then exit;
|
||||||
//
|
//
|
||||||
if Range is TSynD2SynRange then
|
if Range is TSynD2SynRange then
|
||||||
begin
|
begin
|
||||||
|
|
@ -252,7 +253,7 @@ begin
|
||||||
exit(cmpRes[src_t.tokenStringBracketsCount > tokenStringBracketsCount]);
|
exit(cmpRes[src_t.tokenStringBracketsCount > tokenStringBracketsCount]);
|
||||||
if src_t.namedRegionCount <> namedRegionCount then
|
if src_t.namedRegionCount <> namedRegionCount then
|
||||||
exit(cmpRes[src_t.namedRegionCount > namedRegionCount]);
|
exit(cmpRes[src_t.namedRegionCount > namedRegionCount]);
|
||||||
end;
|
end; }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynD2SynRange.Clear;
|
procedure TSynD2SynRange.Clear;
|
||||||
|
|
@ -522,10 +523,13 @@ begin
|
||||||
// spaces
|
// spaces
|
||||||
if (isWhite(reader^)) then
|
if (isWhite(reader^)) then
|
||||||
begin
|
begin
|
||||||
while(isWhite(reader^)) do
|
|
||||||
readerNext;
|
|
||||||
fTokKind := tkBlank;
|
fTokKind := tkBlank;
|
||||||
exit;
|
while(true) do
|
||||||
|
begin
|
||||||
|
if isWhite(reader^) then
|
||||||
|
readerNext;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// line comment / region beg-end
|
// line comment / region beg-end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue