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
This commit is contained in:
parent
ed5b5b834e
commit
6ba0b46cec
|
@ -3723,7 +3723,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
|
||||||
* argv[3] = optional count.
|
* argv[3] = optional count.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if( (goi.argc == 3) || (goi.argc == 4) ){
|
if( (goi.argc == 2) || (goi.argc == 3) ){
|
||||||
/* all is well */
|
/* all is well */
|
||||||
} else {
|
} else {
|
||||||
mwx_error:
|
mwx_error:
|
||||||
|
@ -3740,7 +3740,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
|
||||||
if( e != JIM_OK ){
|
if( e != JIM_OK ){
|
||||||
goto mwx_error;
|
goto mwx_error;
|
||||||
}
|
}
|
||||||
if( goi.argc ){
|
if (goi.argc == 3) {
|
||||||
e = Jim_GetOpt_Wide( &goi, &c );
|
e = Jim_GetOpt_Wide( &goi, &c );
|
||||||
if( e != JIM_OK ){
|
if( e != JIM_OK ){
|
||||||
goto mwx_error;
|
goto mwx_error;
|
||||||
|
|
Loading…
Reference in New Issue