diff options
author | dgp <dgp@users.sourceforge.net> | 2005-08-24 02:35:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-08-24 02:35:47 (GMT) |
commit | 2bdc4bb7231c7970c7add8c2048bca9cca527a78 (patch) | |
tree | 260fc0da117edffa878895b82e5ebf107e46a5c5 | |
parent | 70b83b8c03b9c4ed23f5bd0c3fbf52a8f75d9c1b (diff) | |
download | tcl-2bdc4bb7231c7970c7add8c2048bca9cca527a78.zip tcl-2bdc4bb7231c7970c7add8c2048bca9cca527a78.tar.gz tcl-2bdc4bb7231c7970c7add8c2048bca9cca527a78.tar.bz2 |
[kennykb_numerics_branch]
* generic/tclStrToD.c: Bug fix: set shift magnitude properly whether
we're expanding to mp_int type or not.
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | generic/tclStrToD.c | 8 |
2 files changed, 7 insertions, 4 deletions
@@ -28,6 +28,9 @@ [kennykb_numerics_branch] + * generic/tclStrToD.c: Bug fix: set shift magnitude properly whether + we're expanding to mp_int type or not. + * generic/tclExecute.c: Bug fix: ACCEPT_NAN under INST_UMINUS. * generic/tclStrToD.c: New macros TIP_114_FORMATS and KILL_OCTAL to diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 998a824..758401a 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.1.2.30 2005/08/23 19:15:41 kennykb Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.1.2.31 2005/08/24 02:35:47 dgp Exp $ * *---------------------------------------------------------------------- */ @@ -906,8 +906,8 @@ TclParseNumber( Tcl_Interp* interp, #ifdef TIP_114_FORMATS case BINARY: + shift = numTrailZeros; if (!significandOverflow) { - shift = numTrailZeros; if (significandWide !=0 && (shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide @@ -928,8 +928,8 @@ TclParseNumber( Tcl_Interp* interp, #endif case HEXADECIMAL: /* Returning a hex integer. Final scaling step */ + shift = 4 * numTrailZeros; if (!significandOverflow) { - shift = 4 * numTrailZeros; if (significandWide !=0 && (shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide @@ -950,8 +950,8 @@ TclParseNumber( Tcl_Interp* interp, case OCTAL: /* Returning an octal integer. Final scaling step */ + shift = 3 * numTrailZeros; if (!octalSignificandOverflow) { - shift = 3 * numTrailZeros; if (octalSignificandWide != 0 && (shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || octalSignificandWide |