Skip to content

Conversation

@paulmelnikow
Copy link

While different platforms have different conventions for handling newlines, and std::getline only follows the convention of the current platform. Of course OBJ files could be created on one platform and read on another, which leads to problems.

Here's a bit of explanation:

https://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf

Adapted from the advice there, the fix is to trim the trailing '\r' when it's present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant