* fixed range check error in HasDriveLetter when path is 1 character long

This commit is contained in:
Nikolay Nikolov 2021-10-12 01:42:20 +03:00
parent 00d5bb5bbc
commit fe903f2ae4

View File

@ -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