Tcl Source Code

Artifact [02c336538e]
Login

Artifact 02c336538e90dd09221955db231b65fdd5688a81:

Attachment "1284178.patch" to ticket [1284178fff] added by dgp 2005-09-12 08:54:29.
Index: generic/tclCmdAH.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdAH.c,v
retrieving revision 1.27.2.13
diff -u -r1.27.2.13 tclCmdAH.c
--- generic/tclCmdAH.c	5 Jul 2005 21:18:23 -0000	1.27.2.13
+++ generic/tclCmdAH.c	12 Sep 2005 01:52:56 -0000
@@ -2193,9 +2193,12 @@
 		size = 40 + precision;
 		break;
 	    }
-	    if (Tcl_GetLongFromObj(interp,		/* INTL: Tcl source. */
-		    objv[objIndex], &intValue) != TCL_OK) {
-		goto fmtError;
+	    if (Tcl_GetLongFromObj(NULL, objv[objIndex], &intValue) != TCL_OK) {
+		if (Tcl_GetWideIntFromObj(interp, objv[objIndex], &wideValue)
+			!= TCL_OK) {
+		    goto fmtError;
+		}
+		intValue = Tcl_WideAsLong(wideValue);
 	    }
 
 #if (LONG_MAX > INT_MAX)