mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 15:51:03 +01:00
* fixed range check error in HasDriveLetter when path is 1 character long
This commit is contained in:
parent
00d5bb5bbc
commit
fe903f2ae4
@ -62,7 +62,7 @@ implementation
|
||||
|
||||
function HasDriveLetter(const path: rawbytestring): Boolean;
|
||||
begin
|
||||
HasDriveLetter:=(path<>'') and (UpCase(path[1]) in ['A'..'Z']) and (path[2] = ':');
|
||||
HasDriveLetter:=(Length(path)>=2) and (UpCase(path[1]) in ['A'..'Z']) and (path[2] = ':');
|
||||
end;
|
||||
|
||||
type
|
||||
|
||||
Loading…
Reference in New Issue
Block a user