aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Head <chead@zaber.com>2020-01-27 13:30:04 -0800
committerTomas Vanek <vanekt@fbl.cz>2020-02-23 12:26:45 +0000
commitf1f1f3fe1f2c2ba604205e7163d01b3481e4e96b (patch)
treecbd374b6b298f7a11478c60654eb507b12dadbf7 /src
parentee56c502607760deb1b44b4ab06b1cb3a59029fe (diff)
flash/nor/stm32h7x: fix incorrect array indexing
Change-Id: Iec2246df284953d1442dfefdad8e70041690dfe2 Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/5417 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/stm32h7x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/stm32h7x.c b/src/flash/nor/stm32h7x.c
index 00857291..7ce369be 100644
--- a/src/flash/nor/stm32h7x.c
+++ b/src/flash/nor/stm32h7x.c
@@ -1057,7 +1057,7 @@ COMMAND_HANDLER(stm32x_handle_option_write_command)
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], reg_offset);
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], value);
if (CMD_ARGC > 3)
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], mask);
+ COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], mask);
return stm32x_modify_option(bank, reg_offset, value, mask);
}