summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-06-16 21:56:33 (GMT)
committerstanton <stanton>1999-06-16 21:56:33 (GMT)
commit4d921fcceeabded99b01d7ad892d6fd562192219 (patch)
treebb7b7f3564458026a1797c83e0f80bea28e41fa4 /generic/tclExecute.c
parentc59020a570e9b91cf77bd4c487591045bcdb7de9 (diff)
downloadtcl-4d921fcceeabded99b01d7ad892d6fd562192219.zip
tcl-4d921fcceeabded99b01d7ad892d6fd562192219.tar.gz
tcl-4d921fcceeabded99b01d7ad892d6fd562192219.tar.bz2
* tests/execute.test:
* generic/tclExecute.c (TclExecuteByteCode): Fixed crash caused by a bug in INST_LOAD_SCALAR1 where the scalar index was read as a signed 1 byte value instead of unsigned. [Bug: 2243]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 4378d34..c7e05a4 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -9,7 +9,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.6 1999/04/16 00:46:46 stanton Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.7 1999/06/16 21:56:33 stanton Exp $
*/
#include "tclInt.h"
@@ -1052,7 +1052,7 @@ TclExecuteByteCode(interp, codePtr)
case INST_LOAD_SCALAR1:
#ifdef TCL_COMPILE_DEBUG
- opnd = TclGetInt1AtPtr(pc+1);
+ opnd = TclGetUInt1AtPtr(pc+1);
DECACHE_STACK_INFO();
valuePtr = TclGetIndexedScalar(interp, opnd,
/*leaveErrorMsg*/ 1);
@@ -1067,8 +1067,8 @@ TclExecuteByteCode(interp, codePtr)
TRACE_WITH_OBJ(("%u => ", opnd), valuePtr);
#else /* TCL_COMPILE_DEBUG */
DECACHE_STACK_INFO();
- valuePtr = TclGetIndexedScalar(interp, TclGetInt1AtPtr(pc+1),
- /*leaveErrorMsg*/ 1);
+ opnd = TclGetUInt1AtPtr(pc+1);
+ valuePtr = TclGetIndexedScalar(interp, opnd, /*leaveErrorMsg*/ 1);
CACHE_STACK_INFO();
if (valuePtr == NULL) {
result = TCL_ERROR;