From c2edc7908fc68594761be3bd390aa6bb5335da60 Mon Sep 17 00:00:00 2001 From: Krzysztof Dziuba Date: Sat, 14 Nov 2009 20:59:56 +0100 Subject: [PATCH] Fix for md* commands, similar to mw*. --- src/target/target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5