diff options
author | msofer <msofer@noemail.net> | 2007-08-24 11:22:09 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2007-08-24 11:22:09 (GMT) |
commit | 5e687e014c1f46894672ccabadf79a366a5e93d6 (patch) | |
tree | 611a4a8779f6e4426263aa275fbf207df5fbb33f /generic/tclCompile.c | |
parent | 3504f5270ba264c7c8397fc8eb4b584ac0f2cc3c (diff) | |
download | tcl-5e687e014c1f46894672ccabadf79a366a5e93d6.zip tcl-5e687e014c1f46894672ccabadf79a366a5e93d6.tar.gz tcl-5e687e014c1f46894672ccabadf79a366a5e93d6.tar.bz2 |
* generic/tclCompile.c: replaced copy loop that tripped some
compilers with memmove [Bug 1780870]
FossilOrigin-Name: abcd910d180774226d14905cdda213965e47db13
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 4a6fac5..59617b0 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.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: tclCompile.c,v 1.43.2.7 2006/11/28 22:20:00 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.43.2.8 2007/08/24 11:22:16 msofer Exp $ */ #include "tclInt.h" @@ -2837,10 +2837,10 @@ TclFixupForwardJump(envPtr, jumpFixupPtr, jumpDist, distThreshold) TclExpandCodeArray(envPtr); } jumpPc = (envPtr->codeStart + jumpFixupPtr->codeOffset); - for (numBytes = envPtr->codeNext-jumpPc-2, p = jumpPc+2+numBytes-1; - numBytes > 0; numBytes--, p--) { - p[3] = p[0]; - } + numBytes = envPtr->codeNext-jumpPc-2; + p = jumpPc+2; + memmove(p+3, p, numBytes); + envPtr->codeNext += 3; jumpDist += 3; switch (jumpFixupPtr->jumpType) { |