Skip to content

Commit

Permalink
emu/rendlay.cpp: Fixed locale-sensitive number handling (fixes MT08521).
Browse files Browse the repository at this point in the history
  • Loading branch information
cuavas committed Nov 28, 2022
1 parent 7e0266b commit b36c7a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/emu/rendlay.cpp
Expand Up @@ -224,12 +224,18 @@ class layout_environment
{
if (m_float_valid)
{
m_text = std::to_string(m_float);
std::ostringstream stream;
stream.imbue(std::locale::classic());
stream << m_float;
m_text = std::move(stream).str();
m_text_valid = true;
}
else if (m_int_valid)
{
m_text = std::to_string(m_int);
std::ostringstream stream;
stream.imbue(std::locale::classic());
stream << m_int;
m_text = std::move(stream).str();
m_text_valid = true;
}
}
Expand Down

0 comments on commit b36c7a9

Please sign in to comment.