mirror of https://github.com/snes9xgit/snes9x.git
Check for CR in correct string.
This commit is contained in:
parent
4207ddc9d2
commit
8c24f6d49f
|
@ -64,15 +64,15 @@ std::vector<std::string> read_file_lines(const char *filename)
|
|||
std::string string_contents(file_contents);
|
||||
delete[] file_contents;
|
||||
|
||||
std::istringstream ss(string_contents);
|
||||
std::string line;
|
||||
|
||||
for (char &c : line)
|
||||
for (char &c : string_contents)
|
||||
{
|
||||
if (c == '\r')
|
||||
c = '\n';
|
||||
}
|
||||
|
||||
std::istringstream ss(string_contents);
|
||||
std::string line;
|
||||
|
||||
while (std::getline(ss, line, '\n'))
|
||||
if (!line.empty())
|
||||
lines.push_back(line);
|
||||
|
|
Loading…
Reference in New Issue