Fix parsing bugs for "$target_name mww addr data [count]" ... it was
always requiring the count, instead of just defaulting it to one.
---
 src/target/target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Fix parsing bugs for "$target_name mww addr data [count]" ... it was
always requiring the count, instead of just defaulting it to one.
---
 src/target/target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3723,7 +3723,7 @@ static int tcl_target_func( Jim_Interp *
 		 * 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 *
 		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;
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to