diff options
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 861e6ee20..8a0920fc1 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -810,8 +810,11 @@ void Anope::UpdateTime() #endif } -Anope::string Anope::Expand(const Anope::string& base, const Anope::string& fragment) +Anope::string Anope::Expand(const Anope::string &base, const Anope::string &fragment) { + if (fragment.empty()) + return ""; // We can't expand an empty fragment. + // The fragment is an absolute path, don't modify it. if (std::filesystem::path(fragment.str()).is_absolute()) return fragment; |