Skip to content

Commit

Permalink
check DOS EOL as well
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Sep 9, 2024
1 parent 85e30b8 commit 4e40193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ class MemoryMappedFile {
// True when at end of file
bool eof() { return current >= start + size; }

// True when at end of line
bool eol() { return *current == '\n'; }
// True when at end of line (DOS and UNIX EOF)
bool eol() { return *current == '\n' || *current == '\r'; }

bool read_line() {
line.clear();
Expand Down

0 comments on commit 4e40193

Please sign in to comment.