From c2fed0e61c584f3a6d54a0c4479d43d8982505db Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 Oct 2009 20:18:43 +0000 Subject: [Bug 2889593]: Make [expr round()] give the right error. --- ChangeLog | 13 +++++++++---- generic/tclBasic.c | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bc2a22..a01a097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ +2009-10-31 Donal K. Fellows + + * generic/tclBasic.c (ExprRoundFunc): [Bug 2889593]: Correctly report + the expected number of arguments when generating an error for round(). + 2009-10-30 Pat Thoyts - * tests/tcltest.test: When creating the notwritabledir we deny - the current user access to delete the file. We must grant this - right when we cleanup. Required on Windows 7 when the user does - not automatically have administrator rights. + * tests/tcltest.test: When creating the notwritabledir we deny the + current user access to delete the file. We must grant this right when + we cleanup. Required on Windows 7 when the user does not automatically + have administrator rights. 2009-10-29 Don Porter diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7064b86..68fe439 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.404 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.405 2009/10/31 20:18:43 dkf Exp $ */ #include "tclInt.h" @@ -7710,7 +7710,7 @@ ExprRoundFunc( int type; if (objc != 2) { - MathFuncWrongNumArgs(interp, 1, objc, objv); + MathFuncWrongNumArgs(interp, 2, objc, objv); return TCL_ERROR; } -- cgit v0.12