Merge pull request #9922 from barbudor/pr-GpioConvert

comparison should be >=
This commit is contained in:
Theo Arends 2020-11-20 09:03:04 +01:00 committed by GitHub
commit a46e19e3b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1168,7 +1168,7 @@ int ResponseJsonEndEnd(void)
#ifdef ESP8266
uint16_t GpioConvert(uint8_t gpio) {
if (gpio > ARRAY_SIZE(kGpioConvert)) {
if (gpio >= ARRAY_SIZE(kGpioConvert)) {
return AGPIO(GPIO_USER);
}
return pgm_read_word(kGpioConvert + gpio);