Closed
Description
+
has higher precedence than ?:
, so this line will not expand the buffer, giving an infinite loop with long strftime
results. It should be:
buffer.reserve(buffer.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH));
Simple test:
std::string s = "{:";
for (int i = 0; i < 30; ++i)
s += "%c";
s += "}\n";
auto t = std::time(nullptr);
fmt::print(s, *std::localtime(&t));
Metadata
Metadata
Assignees
Labels
No labels