Skip to content

Commit

Permalink
Update timemory/settings/settings.cpp
Browse files Browse the repository at this point in the history
- fix settings::format check of extension
  • Loading branch information
jrmadsen committed Nov 28, 2023
1 parent e727472 commit 2a1bcba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/timemory/settings/settings.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 2a1bcba

Please sign in to comment.