summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-17 06:40:39 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-17 06:40:39 +0000
commit6ba0b46cec38942bfa04ce9fd6379761df38a841 (patch)
tree9bafab87df19611a67c2da7aa8afb5680365c4a1 /src/target
parented5b5b834eb3d09ff1676ef60d25a629d9358a13 (diff)
downloadopenocd_libswd-6ba0b46cec38942bfa04ce9fd6379761df38a841.tar.gz
openocd_libswd-6ba0b46cec38942bfa04ce9fd6379761df38a841.tar.bz2
openocd_libswd-6ba0b46cec38942bfa04ce9fd6379761df38a841.tar.xz
openocd_libswd-6ba0b46cec38942bfa04ce9fd6379761df38a841.zip
David Brownell <david-b@pacbell.net>:
Fix parsing bugs for "$target_name mww addr data [count]" ... it was always requiring the count, instead of just defaulting it to one. git-svn-id: svn://svn.berlios.de/openocd/trunk@2263 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 32e46b27..5184a80b 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3723,7 +3723,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
* argv[3] = optional count.
*/
- if( (goi.argc == 3) || (goi.argc == 4) ){
+ if( (goi.argc == 2) || (goi.argc == 3) ){
/* all is well */
} else {
mwx_error:
@@ -3740,7 +3740,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
if( e != JIM_OK ){
goto mwx_error;
}
- if( goi.argc ){
+ if (goi.argc == 3) {
e = Jim_GetOpt_Wide( &goi, &c );
if( e != JIM_OK ){
goto mwx_error;