diff options
author | Mateusz Wajchęprzełóż <mati271828@gmail.com> | 2021-01-04 08:59:10 -0500 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-01-04 08:59:10 -0500 |
commit | 6bbc196c64ddbbb84fd40eebeafbd5a458b50afb (patch) | |
tree | 4674f45e2d55ddec8b3c09b10824e079d1b67ec5 /libcody | |
parent | 9e79d76a16c56df0f838b9aede69c0a158203f56 (diff) | |
download | gcc-6bbc196c64ddbbb84fd40eebeafbd5a458b50afb.zip gcc-6bbc196c64ddbbb84fd40eebeafbd5a458b50afb.tar.gz gcc-6bbc196c64ddbbb84fd40eebeafbd5a458b50afb.tar.bz2 |
[libcody] Windows absdir fix
An obvious thinko in dirve name check :(
libcody/
* resolver.cc (IsAbsDir): Fix string indexing.
Signed-off-by: Nathan Sidwell <nathan@acm.org>
Diffstat (limited to 'libcody')
-rw-r--r-- | libcody/resolver.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcody/resolver.cc b/libcody/resolver.cc index b83880f..7e9defb 100644 --- a/libcody/resolver.cc +++ b/libcody/resolver.cc @@ -32,8 +32,8 @@ inline bool IsAbsPath (char const *str) // IIRC windows has the concept of per-drive current directories, // which make drive-using paths confusing. Let's not get into that. return IsDirSep (str) - || (((str[0] >= 'A' && str[1] <= 'Z') - || (str[0] >= 'a' && str[1] <= 'z'))&& str[1] == ':'); + || (((str[0] >= 'A' && str[0] <= 'Z') + || (str[0] >= 'a' && str[0] <= 'z'))&& str[1] == ':'); } #else inline bool IsDirSep (char c) |