diff options
author | dgp <dgp@users.sourceforge.net> | 2006-08-09 18:12:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-08-09 18:12:24 (GMT) |
commit | 3f4ee0c4c41cca715f2b78d15c7823ab14e0cb62 (patch) | |
tree | 199266607c78110bf4ce522ac9bc96a552628799 | |
parent | 74883382511cb4b94eff69c13ac3b197fa55d4ad (diff) | |
download | tcl-3f4ee0c4c41cca715f2b78d15c7823ab14e0cb62.zip tcl-3f4ee0c4c41cca715f2b78d15c7823ab14e0cb62.tar.gz tcl-3f4ee0c4c41cca715f2b78d15c7823ab14e0cb62.tar.bz2 |
* generic/tclEncoding.c: Replace buffer copy in for loop
with call to memcpy(). Thanks to afredd. [Patch 1530262]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclEncoding.c | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2006-08-09 Don Porter <dgp@users.sourceforge.net> + + * generic/tclEncoding.c: Replace buffer copy in for loop + with call to memcpy(). Thanks to afredd. [Patch 1530262] + 2006-08-09 Donal K. Fellows <donal.k.fellows@manchester.ac.uk> * generic/tclCmdIL.c (Tcl_LassignObjCmd): Make the wrong#args message a diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 7abb402..f5e216a 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.42 2006/04/05 00:18:50 andreas_kupries Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.43 2006/08/09 18:12:25 dgp Exp $ */ #include "tclInt.h" @@ -2028,9 +2028,7 @@ BinaryProc( *srcReadPtr = srcLen; *dstWrotePtr = srcLen; *dstCharsPtr = srcLen; - for ( ; --srcLen >= 0; ) { - *dst++ = *src++; - } + memcpy((void *) dst, (void *) src, (size_t) srcLen); return result; } |