Actually, it's a Windows feature:
Every line feed (\LF) on Linux are actually interpreted as carriage-return/line-feed (\CRLF).
The "fix" is in the readExcept lambda function:
ParseNumberFn readExcept = [this]() -> uint8_t {
if (cursor >= base::data.size()) {
throw PpmParseError("unexpected end of file");
}
// replace `cursor++` to `++cursor`:
return base::data[++cursor];
};
Actually, it's a Windows feature: Every line feed (\LF) on Linux are actually interpreted as carriage-return/line-feed (\CRLF). The "fix" is in the
readExcept
lambda function: