From bdef662834f26bf8045bc328cb560d3b52c2f2fb Mon Sep 17 00:00:00 2001 From: JP Meijers Date: Tue, 3 Dec 2019 23:02:11 +0200 Subject: [PATCH] Fix address bounds check Fixes #194 --- src/SPIFlashIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPIFlashIO.cpp b/src/SPIFlashIO.cpp index 083ed29..02e7665 100644 --- a/src/SPIFlashIO.cpp +++ b/src/SPIFlashIO.cpp @@ -54,7 +54,7 @@ //Serial.print(F("_chip.capacity: ")); //Serial.println(_chip.capacity, HEX); - if (_submittedAddress + size >= _chip.capacity) { + if (_submittedAddress + size > _chip.capacity) { //Serial.print(F("_submittedAddress + size: ")); //Serial.println(_submittedAddress + size, HEX); #ifdef DISABLEOVERFLOW