From 044e90f575442f6fa26420ac8de8dd78f96b3963 Mon Sep 17 00:00:00 2001 From: sanni Date: Wed, 2 Nov 2022 00:44:16 +0100 Subject: [PATCH] Update Cart_Reader.ino --- Cart_Reader/Cart_Reader.ino | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 009a82d..bd88772 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -4,7 +4,7 @@ This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. - Date: 01.11.2022 + Date: 02.11.2022 Version: 11.2 SD lib: https://github.com/greiman/SdFat @@ -677,9 +677,8 @@ void rewind_line(FsFile& readfile, byte count = 1) { uint32_t position = readfile.curPosition(); count++; for (byte count_newline = 0; count_newline < count; count_newline++) { - while (1) { - if (readfile.curPosition() == 0) - break; + while (position) { + position--; readfile.seekCur(-1); if (readfile.peek() == '\n') break;