1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-05-05 06:03:52 +00:00

cherrypick pr #3661

This commit is contained in:
gabime 2025-03-17 16:07:31 +02:00
parent 22405cf9ae
commit 88715d29e9

View File

@ -60,6 +60,9 @@ public:
pad_it(remaining_pad_);
} else if (padinfo_.truncate_) {
long new_size = static_cast<long>(dest_.size()) + remaining_pad_;
if (new_size < 0) {
new_size = 0;
}
dest_.resize(static_cast<size_t>(new_size));
}
}
@ -247,7 +250,7 @@ public:
: flag_formatter(padinfo) {}
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
constexpr size_t field_size = 10;
constexpr size_t field_size = 8;
ScopedPadder p(field_size, padinfo_, dest);
fmt_helper::pad2(tm_time.tm_mon + 1, dest);