https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110974

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2023-08-10
     Ever confirmed|0                           |1
   Target Milestone|---                         |13.3

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This fixes it:

--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -465,6 +465,9 @@ namespace __format
                                  unsigned short& __val, bool& __arg_id,
                                  basic_format_parse_context<_CharT>& __pc)
       {
+       if (__first == __last)
+         return __first;
+
        if (__format::__is_digit(*__first))
          {
            auto [__v, __ptr] = __format::__parse_integer(__first, __last);

Reply via email to