From 2a1bcba0cad46efd4421c0c7a145e83b161fb934 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Tue, 28 Nov 2023 00:11:56 -0600 Subject: [PATCH] Update timemory/settings/settings.cpp - fix settings::format check of extension --- source/timemory/settings/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/timemory/settings/settings.cpp b/source/timemory/settings/settings.cpp index c1fd14520..a743308e1 100644 --- a/source/timemory/settings/settings.cpp +++ b/source/timemory/settings/settings.cpp @@ -499,8 +499,8 @@ settings::format(std::string _prefix, std::string _tag, std::string _suffix, std::string _ext) { // add period before extension - if(_ext.find('.') != 0) - _ext = std::string(".") + _ext; + if(!_ext.empty() && _ext.find('.') != 0) + _ext = std::string{ "." } + _ext; // if the tag contains the extension, remove it auto _ext_pos = _tag.length() - _ext.length();