From 758b3f5631c53cb9ff40e7d517eb4d337cc56394 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 16 May 2022 19:03:30 +0200 Subject: [PATCH] Potential fix for strange new error in clang 14 --- src/Exception.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Exception.hpp b/src/Exception.hpp index 1ba0af3..5b52775 100644 --- a/src/Exception.hpp +++ b/src/Exception.hpp @@ -1,5 +1,6 @@ #ifndef ARBUTILS_EXCEPTION_HPP #define ARBUTILS_EXCEPTION_HPP +#include #include #include #include "ErrorHelpers.hpp" @@ -135,7 +136,9 @@ namespace ArbUt { backward::SnippetFactory& snippetFactory) { auto fileName = (strrchr(source.filename.c_str(), '/') ? strrchr(source.filename.c_str(), '/') + 1 : source.filename.c_str()); - + if (strlen(fileName) == 0){ + return; + } auto snippetSearch = snippetFactory.get_snippet(source.filename, source.line, 1); if (snippetSearch.empty()) { ss << fileName << "[" << source.line << "]" << std::endl;