[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>
This commit is contained in:
Mateusz Wajchęprzełóż 2021-01-04 08:59:10 -05:00 committed by Nathan Sidwell
parent 9e79d76a16
commit 6bbc196c64
1 changed files with 2 additions and 2 deletions

View File

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