From 77cbb25b67f4aca54f87fafa1d6b72c960d249a9 Mon Sep 17 00:00:00 2001 From: Kreeblah Date: Sun, 24 Jan 2021 02:13:58 -0800 Subject: [PATCH] Corrected file reading calls --- Cart_Reader/NES.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index 833f8e2..2cede86 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -726,7 +726,7 @@ void outputNES() { uint32_t prg_crc32; File prg_crc32_file; - if(sd.open(filePRG, O_READ)) + if(prg_crc32_file.open(filePRG, O_READ)) { prg_crc32 = crc32(prg_crc32_file, 1024 * prg); prg_crc32_file.close(); @@ -736,7 +736,7 @@ void outputNES() { if(chr > 0) { File chr_crc32_file; - if(sd.open(fileCHR, O_READ)) + if(prg_crc32_file.open(fileCHR, O_READ)) { chr_crc32 = crc32(chr_crc32_file, 1024 * chr); chr_crc32_file.close();