--- generic/tclCmdMZ.c	Sat Dec 22 11:11:13 2001
+++ generic/tclCmdMZ.c	Sat Dec 22 10:35:16 2001
@@ -2441,6 +2441,15 @@
 		case TCL_CONTINUE:
 		    Tcl_ResetResult(interp);
 		    old = p = (p+1 + iPtr->termOffset + 1);
+		    
+		    /*
+		     * Check that the bracket term was terminated properly.
+		     */
+
+		    if (*(p-1) != ']') {
+			Tcl_SetObjResult(interp, Tcl_NewStringObj("missing close-bracket", -1));
+			goto errorResult;
+		    }
 		}
 	    } else {
 		p++;
