mirror of
https://github.com/holub/mame
synced 2025-06-30 07:58:56 +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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user