The reason this change is necessary is because the raw .obj data might not be null terminated. This means that there might be content between the end of the file and the last found line end.
Taking the viewer as an example, mmap returns a char* of just the number of bytes requested and does not include a null character at the end. If there are no empty lines at the end of the file, as in the example in #12, the last face is ignored.
Take two.
The reason this change is necessary is because the raw .obj data might not be null terminated. This means that there might be content between the end of the file and the last found line end.
Taking the viewer as an example, mmap returns a
char*
of just the number of bytes requested and does not include a null character at the end. If there are no empty lines at the end of the file, as in the example in #12, the last face is ignored.