summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-09-28 20:06:42 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-09-28 20:06:42 (GMT)
commit341cfa533b51784f8cb9183ec8e2ed6fe6a26e32 (patch)
tree6eca71999a4390624d89bbc89b813a4d2e276495 /generic/tclExecute.c
parent4c1d56db0ef7325c1817833b5f178dd393fb54e9 (diff)
downloadtcl-341cfa533b51784f8cb9183ec8e2ed6fe6a26e32.zip
tcl-341cfa533b51784f8cb9183ec8e2ed6fe6a26e32.tar.gz
tcl-341cfa533b51784f8cb9183ec8e2ed6fe6a26e32.tar.bz2
* generic/tclExecute.c: Corrected error in INST_LSHIFT in the
* tests/expr.test: calculation done to determine whether a shift in the (long int) type is possible. The calculation had literal value "1" where it needed a value "1L" to compute the correct result. Error detected via testing with the math::bigfloat package [Bug 1567222]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 7006d00..660be98 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.245 2006/09/19 16:31:56 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.246 2006/09/28 20:06:42 dgp Exp $
*/
#include "tclInt.h"
@@ -3942,7 +3942,7 @@ TclExecuteByteCode(
if ((type1 == TCL_NUMBER_LONG) && ((size_t)shift < CHAR_BIT*sizeof(long))
&& (l1 = *((CONST long *)ptr1))
&& !(((l1>0) ? l1 : ~l1)
- & -(1<<(CHAR_BIT*sizeof(long)-1-shift)))) {
+ & -(1L<<(CHAR_BIT*sizeof(long)-1-shift)))) {
TclNewLongObj(objResultPtr, (l1<<shift));
TRACE(("%s\n", O2S(objResultPtr)));
NEXT_INST_F(1, 2, 1);