mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Range check error
This commit is contained in:
parent
410fbfd484
commit
367d5d4d83
1 changed files with 4 additions and 2 deletions
|
|
@ -1041,13 +1041,15 @@ end;
|
|||
|
||||
function StrBegins(const StringToCheck, StringToMatch: String): Boolean;
|
||||
begin
|
||||
Result := (Length(StringToCheck) >= Length(StringToMatch)) and
|
||||
Result := (Length(StringToMatch) > 0) and
|
||||
(Length(StringToCheck) >= Length(StringToMatch)) and
|
||||
(CompareChar(StringToCheck[1], StringToMatch[1], Length(StringToMatch)) = 0);
|
||||
end;
|
||||
|
||||
function StrEnds(const StringToCheck, StringToMatch: String): Boolean;
|
||||
begin
|
||||
Result := (Length(StringToCheck) >= Length(StringToMatch)) and
|
||||
Result := (Length(StringToMatch) > 0) and
|
||||
(Length(StringToCheck) >= Length(StringToMatch)) and
|
||||
(CompareChar(StringToCheck[1 + Length(StringToCheck) - Length(StringToMatch)],
|
||||
StringToMatch[1], Length(StringToMatch)) = 0);
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue