diff options
Diffstat (limited to 'src/lib/gpio.c')
-rw-r--r-- | src/lib/gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c index 0656dfb870..da748492fc 100644 --- a/src/lib/gpio.c +++ b/src/lib/gpio.c @@ -82,7 +82,8 @@ uint32_t _gpio_base3_value(const gpio_t gpio[], int num_gpio, int binary_first) int index; int temp; char value[32]; - assert(num_gpio <= 32); + if ((num_gpio > 32) && (num_gpio < 1)) + die("gpio_base3_value: Invalid number of GPIOs"); /* Enable internal pull up */ for (index = 0; index < num_gpio; ++index) |