summaryrefslogtreecommitdiffstats
path: root/generic/tclGet.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-20 16:06:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-20 16:06:16 (GMT)
commit7661d10d9c8f7d52761d3481a52e770ba3f8b3fe (patch)
tree21bdd0348d778f9641ea900faf308406f81541c3 /generic/tclGet.c
parent83b7caad0f7cbf70e83ec99688ef29b77d0f762d (diff)
downloadtcl-7661d10d9c8f7d52761d3481a52e770ba3f8b3fe.zip
tcl-7661d10d9c8f7d52761d3481a52e770ba3f8b3fe.tar.gz
tcl-7661d10d9c8f7d52761d3481a52e770ba3f8b3fe.tar.bz2
* generic/tclGet.c (Tcl_GetInt): Corrected error that did not
* generic/tclObj.c (Tcl_GetIntFromObj): permit 0x80000000 to be recognized as an integer on TCL_WIDE_INT_IS_LONG systems [Bug 1090869].
Diffstat (limited to 'generic/tclGet.c')
-rw-r--r--generic/tclGet.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclGet.c b/generic/tclGet.c
index 6819322..307b386 100644
--- a/generic/tclGet.c
+++ b/generic/tclGet.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclGet.c,v 1.8 2002/11/19 02:34:49 hobbs Exp $
+ * RCS: @(#) $Id: tclGet.c,v 1.8.2.1 2005/04/20 16:06:17 dgp Exp $
*/
#include "tclInt.h"
@@ -92,7 +92,11 @@ Tcl_GetInt(interp, string, intPtr)
* an int.
*/
- if ((errno == ERANGE) || (((long)(int) i) != i)) {
+ if ((errno == ERANGE)
+#if (LONG_MAX > INT_MAX)
+ || (i > UINT_MAX) || (i < -(long)UINT_MAX)
+#endif
+ ) {
if (interp != (Tcl_Interp *) NULL) {
Tcl_SetResult(interp, "integer value too large to represent",
TCL_STATIC);