summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorKrzysztof Dziuba <krzysztof.dziuba@gazeta.pl>2009-11-14 20:59:56 +0100
committerZachary T Welch <zw@superlucidity.net>2009-11-14 17:39:27 -0800
commitc2edc7908fc68594761be3bd390aa6bb5335da60 (patch)
tree7b4196e90ab738ed792d8c5bb32a252e6e18e653 /src/target
parentecc659d44da1c8d2291c22be61d2819b55fa7b17 (diff)
downloadopenocd+libswd-c2edc7908fc68594761be3bd390aa6bb5335da60.tar.gz
openocd+libswd-c2edc7908fc68594761be3bd390aa6bb5335da60.tar.bz2
openocd+libswd-c2edc7908fc68594761be3bd390aa6bb5335da60.tar.xz
openocd+libswd-c2edc7908fc68594761be3bd390aa6bb5335da60.zip
Fix for md* commands, similar to mw*.
Diffstat (limited to 'src/target')
-rw-r--r--src/target/target.c3
1 files changed, 2 insertions, 1 deletions
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;