From f1f1f3fe1f2c2ba604205e7163d01b3481e4e96b Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Mon, 27 Jan 2020 13:30:04 -0800 Subject: flash/nor/stm32h7x: fix incorrect array indexing Change-Id: Iec2246df284953d1442dfefdad8e70041690dfe2 Signed-off-by: Christopher Head Reviewed-on: http://openocd.zylin.com/5417 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI Reviewed-by: Andreas Fritiofson --- src/flash/nor/stm32h7x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nor/stm32h7x.c b/src/flash/nor/stm32h7x.c index 0085729..7ce369b 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); } -- cgit v1.1