Skip to content
Snippets Groups Projects
Commit f89cfdb2 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Fix std::format("{}", negative_integer) [PR114325]

The fast path for "{}" format strings has a bug for negative integers
where the length passed to std::to_chars is too long.

libstdc++-v3/ChangeLog:

	PR libstdc++/114325
	* include/std/format (_Scanner::_M_scan): Pass correct length to
	__to_chars_10_impl.
	* testsuite/std/format/functions/format.cc: Check negative
	integers with empty format-spec.
parent df483ebd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment