]> git.sur5r.net Git - openocd/commitdiff
Fix for md* commands, similar to mw*.
authorKrzysztof Dziuba <krzysztof.dziuba@gazeta.pl>
Sat, 14 Nov 2009 19:59:56 +0000 (20:59 +0100)
committerZachary T Welch <zw@superlucidity.net>
Sun, 15 Nov 2009 01:39:27 +0000 (17:39 -0800)
src/target/target.c

index 6ecf16a1e887750fb08a35b3c1a62a0744d94612..2385d0f6223e7bc415dff3b62026fcc30743db13 100644 (file)
@@ -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;