]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Fix order of arguments to sprintf [PR 99261]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 24 Feb 2021 22:25:31 +0000 (22:25 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 24 Feb 2021 22:33:59 +0000 (22:33 +0000)
libstdc++-v3/ChangeLog:

PR libstdc++/99261
* src/c++17/floating_to_chars.cc (sprintf_ld): Add extra args
before value to be printed.

libstdc++-v3/src/c++17/floating_to_chars.cc

index f1512017aa3c0d894c0e239cc17fa40885086780..611747bb99e20752a3156dc5ea65e24c03631ebf 100644 (file)
@@ -870,10 +870,10 @@ namespace
 
 #ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
     if constexpr (is_same_v<T, __ieee128>)
-      len = __sprintfieee128(buffer, format_string, value, args...);
+      len = __sprintfieee128(buffer, format_string, args..., value);
     else
 #endif
-    len = sprintf(buffer, format_string, value, args...);
+    len = sprintf(buffer, format_string, args..., value);
 
 #if _GLIBCXX_USE_C99_FENV_TR1 && defined(FE_TONEAREST)
     if (saved_rounding_mode != FE_TONEAREST)
This page took 0.060083 seconds and 5 git commands to generate.