From: zwelch Date: Wed, 17 Jun 2009 06:40:39 +0000 (+0000) Subject: David Brownell : X-Git-Tag: v0.2.0~252 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=6ba0b46cec38942bfa04ce9fd6379761df38a841 David Brownell : 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 --- diff --git a/src/target/target.c b/src/target/target.c index 32e46b2759..5184a80bd6 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;