mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
os: fix is_abs_path() panic, when path is only one letter on windows (#10071)
This commit is contained in:
parent
159ee00563
commit
e9c84ce154
1 changed files with 1 additions and 1 deletions
|
@ -422,7 +422,7 @@ pub fn is_abs_path(path string) bool {
|
|||
}
|
||||
$if windows {
|
||||
return path[0] == `/` || // incase we're in MingGW bash
|
||||
(path[0].is_letter() && path[1] == `:`)
|
||||
(path[0].is_letter() && path.len > 1 && path[1] == `:`)
|
||||
}
|
||||
return path[0] == `/`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue