From: Dean Glazeski Date: Thu, 19 Nov 2009 05:22:25 +0000 (-0600) Subject: nand_fileio_parse_args parses wrong param for size X-Git-Tag: v0.4.0-rc1~496 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c049033fde1592e1bfa922641034c1ab136e0b47;p=openocd 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 --- 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");