diff options
author | hobbs <hobbs> | 2002-10-17 23:38:01 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-10-17 23:38:01 (GMT) |
commit | d7c572c8f41dac197c5a1b349fa6a4fdbc67be80 (patch) | |
tree | c80e54b66b58bb37c2cc0d3131187ee22108d012 /unix/tkUnixFont.c | |
parent | 695df2d9ab45c301c5599cda27aaf27c819fd441 (diff) | |
download | tk-d7c572c8f41dac197c5a1b349fa6a4fdbc67be80.zip tk-d7c572c8f41dac197c5a1b349fa6a4fdbc67be80.tar.gz tk-d7c572c8f41dac197c5a1b349fa6a4fdbc67be80.tar.bz2 |
* tests/text.test: properly return the number of
* unix/tkUnixFont.c (ControlUtfProc): bytes consumed. [Bug #624732]
Diffstat (limited to 'unix/tkUnixFont.c')
-rw-r--r-- | unix/tkUnixFont.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 5f5b881..de4c8e2 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.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: tkUnixFont.c,v 1.15 2002/08/05 04:30:41 dgp Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.16 2002/10/17 23:38:01 hobbs Exp $ */ #include "tkUnixInt.h" @@ -406,7 +406,7 @@ ControlUtfProc(clientData, src, srcLen, flags, statePtr, dst, dstLen, * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcEnd; + CONST char *srcStart, *srcEnd; char *dstStart, *dstEnd; Tcl_UniChar ch; int result; @@ -416,8 +416,9 @@ ControlUtfProc(clientData, src, srcLen, flags, statePtr, dst, dstLen, 'a', 'b', 't', 'n', 'v', 'f', 'r' }; - result = TCL_OK; + result = TCL_OK; + srcStart = src; srcEnd = src + srcLen; dstStart = dst; @@ -447,7 +448,7 @@ ControlUtfProc(clientData, src, srcLen, flags, statePtr, dst, dstLen, dst += 6; } } - *srcReadPtr = src - srcEnd; + *srcReadPtr = src - srcStart; *dstWrotePtr = dst - dstStart; *dstCharsPtr = dst - dstStart; return result; |