forked from boostorg/static_string
Call correct overload of swprintf
This commit is contained in:
@ -405,7 +405,7 @@ inline
|
|||||||
static_string<N>
|
static_string<N>
|
||||||
to_static_string_float_impl(Floating value)
|
to_static_string_float_impl(Floating value)
|
||||||
{
|
{
|
||||||
char buffer[N];
|
char buffer[N + 1];
|
||||||
std::sprintf(buffer, "%f", value);
|
std::sprintf(buffer, "%f", value);
|
||||||
return static_string<N>(buffer);
|
return static_string<N>(buffer);
|
||||||
}
|
}
|
||||||
@ -415,8 +415,8 @@ inline
|
|||||||
static_wstring<N>
|
static_wstring<N>
|
||||||
to_static_wstring_float_impl(Floating value)
|
to_static_wstring_float_impl(Floating value)
|
||||||
{
|
{
|
||||||
wchar_t buffer[N];
|
wchar_t buffer[N + 1];
|
||||||
std::swprintf(buffer, L"%f", value);
|
std::swprintf(buffer, N + 1, L"%f", value);
|
||||||
return static_wstring<N>(buffer);
|
return static_wstring<N>(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user