diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/gpio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c index b185cc2c6a..72bd7eccfd 100644 --- a/src/lib/gpio.c +++ b/src/lib/gpio.c @@ -17,6 +17,7 @@ * Foundation, Inc. */ +#include <assert.h> #include <base3.h> #include <console/console.h> #include <delay.h> @@ -53,7 +54,8 @@ int gpio_base3_value(gpio_t gpio[], int num_gpio) int temp; int index; int result = 0; - char value[num_gpio]; + char value[32]; + assert(num_gpio <= 32); /* Enable internal pull up */ for (index = 0; index < num_gpio; ++index) |