aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-04-26 15:17:11 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-04-26 15:17:11 -0700
commit4116b97d6eba4bf3e9414bdfcbbf513d05c0022f (patch)
tree0916f78c5cf7344e27012b2522e93f9c442859f0
parent17d04aded36c454c942e4d31e3a0be41c3f4959b (diff)
downloadriscv-openocd-4116b97d6eba4bf3e9414bdfcbbf513d05c0022f.zip
riscv-openocd-4116b97d6eba4bf3e9414bdfcbbf513d05c0022f.tar.gz
riscv-openocd-4116b97d6eba4bf3e9414bdfcbbf513d05c0022f.tar.bz2
Correct an off-by-one in argument parsing
-rw-r--r--src/flash/nor/fespi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c
index cf86164..ed72678 100644
--- a/src/flash/nor/fespi.c
+++ b/src/flash/nor/fespi.c
@@ -188,7 +188,7 @@ FLASH_BANK_COMMAND_HANDLER(fespi_flash_bank_command)
bank->driver_priv = fespi_info;
fespi_info->probed = 0;
fespi_info->ctrl_base = 0;
- if (CMD_ARGC >= 6) {
+ if (CMD_ARGC >= 7) {
int temp;
COMMAND_PARSE_NUMBER(int, CMD_ARGV[6], temp);
fespi_info->ctrl_base = (uint32_t) temp;