DynamicMacros: Make sure we keep within bounds during play

Caught by @gedankenexperimenter, thanks!

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/1179/head
Gergely Nagy 3 years ago
parent 39e607e7c7
commit d29ffa72dc
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -141,7 +141,7 @@ void DynamicMacros::play(uint8_t macro_id) {
pos = storage_base_ + map_[macro_id]; pos = storage_base_ + map_[macro_id];
while (true) { while (pos < storage_base_ + storage_size_) {
switch (macro = Runtime.storage().read(pos++)) { switch (macro = Runtime.storage().read(pos++)) {
case MACRO_ACTION_STEP_EXPLICIT_REPORT: case MACRO_ACTION_STEP_EXPLICIT_REPORT:
case MACRO_ACTION_STEP_IMPLICIT_REPORT: case MACRO_ACTION_STEP_IMPLICIT_REPORT:

Loading…
Cancel
Save