mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-05-10 06:24:57 +00:00
Fix CsvStream not reading values properly
This commit is contained in:
parent
0ff06cad72
commit
3529214596
@ -25,9 +25,20 @@ bool CsvInputStream::NextRow(std::vector<std::string>& out) const
|
|||||||
col.clear();
|
col.clear();
|
||||||
col.str(std::string());
|
col.str(std::string());
|
||||||
}
|
}
|
||||||
|
else if(c == '\r')
|
||||||
|
{
|
||||||
|
c = m_stream.get();
|
||||||
|
if (c == '\n')
|
||||||
|
break;
|
||||||
|
col << '\r';
|
||||||
|
}
|
||||||
|
else if(c == '\n')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
col << c;
|
col << static_cast<char>(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = m_stream.get();
|
c = m_stream.get();
|
||||||
@ -35,9 +46,6 @@ bool CsvInputStream::NextRow(std::vector<std::string>& out) const
|
|||||||
|
|
||||||
if(!isEof)
|
if(!isEof)
|
||||||
{
|
{
|
||||||
const auto lastEntry = col.str();
|
|
||||||
|
|
||||||
if(!lastEntry.empty())
|
|
||||||
out.emplace_back(col.str());
|
out.emplace_back(col.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user