From 4e401937d9e5b7041c0d0dbfb0830c6a6f0d4c70 Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Mon, 9 Sep 2024 12:19:19 -0600 Subject: [PATCH] check DOS EOL as well --- src/deck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deck.cpp b/src/deck.cpp index 58752d8..70ef831 100644 --- a/src/deck.cpp +++ b/src/deck.cpp @@ -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();