mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Fix headless auto-compare when expected have \r's.
This commit is contained in:
@@ -53,7 +53,7 @@ struct BufferedLineReader {
|
||||
|
||||
void Fill() {
|
||||
while (valid_ < MAX_BUFFER && HasMoreLines()) {
|
||||
buffer_[valid_++] = ReadLine();
|
||||
buffer_[valid_++] = TrimNewlines(ReadLine());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,14 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
static std::string TrimNewlines(const std::string &s) {
|
||||
size_t p = s.find_last_not_of("\r\n");
|
||||
if (p == s.npos) {
|
||||
return "";
|
||||
}
|
||||
return s.substr(0, p + 1);
|
||||
}
|
||||
|
||||
int valid_;
|
||||
std::string buffer_[MAX_BUFFER];
|
||||
const std::string data_;
|
||||
|
||||
Reference in New Issue
Block a user