From c7f043246e16188634eccd4e87fa847a1d58a9c4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 22 Aug 2021 12:18:42 +0300 Subject: [PATCH] Fix Path::is_absolute for empty paths on Windows --- source/fs/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fs/path.cpp b/source/fs/path.cpp index d68595b..bd107f1 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -59,7 +59,7 @@ unsigned Path::size() const bool Path::is_absolute() const { #ifdef _WIN32 - if(is_windows_drive((*this)[0])) + if(!empty() && is_windows_drive((*this)[0])) return true; #endif return path[0]==DIRSEP; -- 2.43.0