Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct issue with \cr\lf in
jsrReadFile
Honestly getting pretty sick of Windows. You see, Windows uses \cr\lf as default line endings in files, so, when opening a file without specifying the `b` access mode, it does whatever the fuck it wants and starts converting line feeds between unix-mode and windows-mode messing up the file more often than not. The real fun part is that the returned count of read bytes by `fwrite` is not the same as the count returned by ftell(SEEK_END), causing all sorts of troubles. I finally decided to slap the `b` access flag on all file accesses, and just deal with stupid carriage returns rather than bugs in the file reading logic caused by unsynchronized ftell/fread return values. The more i program in C for Windows, the more it amazes me. And not in a good way.
- Loading branch information