mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-20 06:09:51 +01:00
Fix number to string conversion failing after a failed string to number
conversion
This commit is contained in:
parent
5d80d77f55
commit
730cf0806a
@ -399,6 +399,7 @@ String::Split String::SplitSigned(long long int &value, size_t pos, std::ios_bas
|
||||
LocaleImpl.wstream >> value;
|
||||
if(LocaleImpl.wstream.fail())
|
||||
{
|
||||
LocaleImpl.wstream.clear();
|
||||
LocaleImpl.FlushWStream();
|
||||
return Split(*this, pos, npos, 0, false);
|
||||
}
|
||||
@ -414,6 +415,7 @@ String::Split String::SplitUnsigned(unsigned long long int &value, size_t pos, s
|
||||
LocaleImpl.wstream >> value;
|
||||
if(LocaleImpl.wstream.fail())
|
||||
{
|
||||
LocaleImpl.wstream.clear();
|
||||
LocaleImpl.FlushWStream();
|
||||
return Split(*this, pos, npos, 0, false);
|
||||
}
|
||||
@ -429,6 +431,7 @@ String::Split String::SplitFloat(double &value, size_t pos, std::ios_base::fmtfl
|
||||
LocaleImpl.wstream >> value;
|
||||
if(LocaleImpl.wstream.fail())
|
||||
{
|
||||
LocaleImpl.wstream.clear();
|
||||
LocaleImpl.FlushWStream();
|
||||
return Split(*this, pos, npos, 0, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user