Merge pull request #16147 from stefanbode/patch-5

fix #15851
This commit is contained in:
Theo Arends 2022-08-03 20:04:36 +02:00 committed by GitHub
commit f31c4bdea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1767,7 +1767,7 @@ bool Xdrv27(uint8_t function)
}
break;
case FUNC_BUTTON_PRESSED:
if (Settings->shutter_button[XdrvMailbox.index] & (1<<31)) {
if (XdrvMailbox.index < MAX_SHUTTER_KEYS && Settings->shutter_button[XdrvMailbox.index] & (1<<31)) {
ShutterButtonHandler();
result = true;
}