From: Krzysztof Dziuba Date: Sat, 14 Nov 2009 19:59:56 +0000 (+0100) Subject: Fix for md* commands, similar to mw*. X-Git-Tag: v0.4.0-rc1~601 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c2edc7908fc68594761be3bd390aa6bb5335da60;p=openocd Fix for md* commands, similar to mw*. --- diff --git a/src/target/target.c b/src/target/target.c index 6ecf16a1..2385d0f6 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2256,7 +2256,8 @@ COMMAND_HANDLER(handle_md_command) return ERROR_COMMAND_SYNTAX_ERROR; unsigned size = 0; - switch (CMD_NAME[2]) { + const char *cmd_name = CMD_NAME; + switch (cmd_name[6]) { case 'w': size = 4; break; case 'h': size = 2; break; case 'b': size = 1; break;