diff options
| -rw-r--r-- | src/format.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/format.hpp b/src/format.hpp index 40e85f3..f857f96 100644 --- a/src/format.hpp +++ b/src/format.hpp @@ -38,7 +38,7 @@ inline std::string fmt(eFormatType type, std::string str) { break; } - if (str.back() != '\n' && type != NONEWLINE) + if (!str.empty() && str.back() != '\n' && type != NONEWLINE) str += '\n'; return prefix + str; |
