summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorDean Glazeski <dnglaze@gmail.com>2009-11-18 23:22:25 -0600
committerZachary T Welch <zw@superlucidity.net>2009-11-19 07:00:30 -0800
commitc049033fde1592e1bfa922641034c1ab136e0b47 (patch)
treea99f39fa61be0a865c763f10c7d326f9dba50a2c /src/flash
parent195ce5eb273983dbeabeea41cc18b77e4f30ab41 (diff)
downloadopenocd_libswd-c049033fde1592e1bfa922641034c1ab136e0b47.tar.gz
openocd_libswd-c049033fde1592e1bfa922641034c1ab136e0b47.tar.bz2
openocd_libswd-c049033fde1592e1bfa922641034c1ab136e0b47.tar.xz
openocd_libswd-c049033fde1592e1bfa922641034c1ab136e0b47.zip
nand_fileio_parse_args parses wrong param for size
This changes the size parameter from argv[2] to argv[3], which is what it's supposed to be. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nand.c b/src/flash/nand.c
index 23caed0d..53b6531d 100644
--- a/src/flash/nand.c
+++ b/src/flash/nand.c
@@ -1406,7 +1406,7 @@ static COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state,
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], state->address);
if (need_size)
{
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], state->size);
+ COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], state->size);
if (state->size % nand->page_size)
{
command_print(CMD_CTX, "only page-aligned sizes are supported");