forked from mia/Aegisub
Handle Windows newlines in line_iterator on non-Windows
Originally committed to SVN as r6141.
This commit is contained in:
parent
4c9ebe1a4d
commit
77cf1f7583
1 changed files with 2 additions and 0 deletions
|
@ -194,6 +194,8 @@ void line_iterator<OutputType>::next() {
|
|||
std::string str, cstr, *target;
|
||||
if (width == 1) {
|
||||
std::getline(*stream, str);
|
||||
if (str.size() && *str.rbegin() == '\r')
|
||||
str.resize(str.size() - 1);
|
||||
}
|
||||
else {
|
||||
getline(str);
|
||||
|
|
Loading…
Reference in a new issue