ef82ad6ad7dcbd58e03e95f5ab3ae00acee5944f
The method will loop until it finds \r or \n at the end of the string. This is a valid approach, but what happens when the length we chose to fgets() with only gets the \r? We end up with a line that's just \n and the whole thing crashes out. Therefore, after every fgets() we have to check that the \n isn't the next character. If so, keep it; if not, step the file pointer back. And this is precisely why we should be depending on something else to do this for us, not our own code.
Description
No description provided
274 MiB
Languages
C++
89.9%
C
6.6%
CMake
1.7%
Python
0.7%
Shell
0.4%
Other
0.7%