diff --git a/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp b/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp index c80fd15a..eb0ec223 100644 --- a/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp +++ b/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp @@ -272,7 +272,7 @@ EventHandlerResult DynamicMacros::onFocusEvent(const char *command) { } else { uint16_t pos = 0; - while (!::Focus.isEOL()) { + while (!::Focus.isEOL() && pos < storage_size_) { uint8_t b; ::Focus.read(b);