diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2001-08-23 14:22:49 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2001-08-23 14:22:49 (GMT) |
commit | 9222d1cf0d56f0b84b3645f54e0b1422ba7f4b30 (patch) | |
tree | 6fa3cc7a93c57b5abdec868f69e6dc434a60ff47 /generic/tclBinary.c | |
parent | ca48af684b8e9b39e58b1eafbc3747edda1a249f (diff) | |
download | tcl-9222d1cf0d56f0b84b3645f54e0b1422ba7f4b30.zip tcl-9222d1cf0d56f0b84b3645f54e0b1422ba7f4b30.tar.gz tcl-9222d1cf0d56f0b84b3645f54e0b1422ba7f4b30.tar.bz2 |
Fixed annoying fault in [binary format] on 64-bit architectures.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index e0facb5..9fd9f4d 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.7 2001/04/04 16:07:20 kennykb Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.8 2001/08/23 14:22:49 dkf Exp $ */ #include <math.h> @@ -1393,7 +1393,7 @@ FormatNumber(interp, type, src, cursorPtr) Tcl_Obj *src; /* Number to format. */ unsigned char **cursorPtr; /* Pointer to index into destination buffer. */ { - int value; + long value; double dvalue; if ((type == 'd') || (type == 'f')) { @@ -1426,7 +1426,7 @@ FormatNumber(interp, type, src, cursorPtr) *cursorPtr += sizeof(float); } } else { - if (Tcl_GetIntFromObj(interp, src, &value) != TCL_OK) { + if (Tcl_GetLongFromObj(interp, src, &value) != TCL_OK) { return TCL_ERROR; } if (type == 'c') { |