From 87466f3d2b65ced1ba496b130d0768223c950a0a Mon Sep 17 00:00:00 2001 From: MingChia Chung Date: Wed, 22 Jul 2020 02:04:35 +0800 Subject: [PATCH] fix: incorrect buffer length --- .../6-Inkplate_SD_TXT_file/6-Inkplate_SD_TXT_file.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/2. Advanced Inkplate Features/6-Inkplate_SD_TXT_file/6-Inkplate_SD_TXT_file.ino b/examples/2. Advanced Inkplate Features/6-Inkplate_SD_TXT_file/6-Inkplate_SD_TXT_file.ino index 4ba7fa3..ba31fc1 100644 --- a/examples/2. Advanced Inkplate Features/6-Inkplate_SD_TXT_file/6-Inkplate_SD_TXT_file.ino +++ b/examples/2. Advanced Inkplate Features/6-Inkplate_SD_TXT_file/6-Inkplate_SD_TXT_file.ino @@ -41,7 +41,7 @@ void setup() { } else { display.clearDisplay(); //Clear everything that is stored in frame buffer of epaper display.setCursor(0,0); //Set print position at the begining of the screen - char text[200]; //Array where data from SD card is stored (max 200 chars here) + char text[201]; //Array where data from SD card is stored (max 200 chars here) int len = file.fileSize(); //Read how big is file that we are opening if(len>200) len = 200; //If it's more than 200 bytes (200 chars), limit to max 200 bytes file.read(text, len); //Read data from file and save it in text array