mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
emu/rendlay.cpp: Fixed locale-sensitive number handling (fixes MT08521).
This commit is contained in:
parent
7e0266be64
commit
b36c7a90bf
@ -224,12 +224,18 @@ private:
|
|||||||
{
|
{
|
||||||
if (m_float_valid)
|
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;
|
m_text_valid = true;
|
||||||
}
|
}
|
||||||
else if (m_int_valid)
|
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;
|
m_text_valid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user