--- tcl8.4.9/generic/tclObj.c.orig 2004-11-08 10:32:05.000000000 +0100 +++ tcl8.4.9/generic/tclObj.c 2004-12-08 13:44:36.000000000 +0100 @@ -1790,7 +1790,7 @@ Tcl_Panic( "string->integer conversion failed to convert the obj." ); } - if (((long)((int)l)) == l) { + if ((l <= UINT_MAX) && (l >= INT_MIN)) { *intPtr = (int)l; return TCL_OK; }