diff options
author | Peter Jeremy <peterjeremy@acm.org> | 2012-02-27 13:39:58 +1100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-08 10:51:28 -0700 |
commit | 3bc1cf3e11be566e3d342834abe8fde7f5983a80 (patch) | |
tree | 380c9f895fc7c83971d19b3ec2ee5a2473a82bdc | |
parent | 415b229bf02de9e4c9ac75a458912336661f5ed1 (diff) | |
download | xscope-3bc1cf3e11be566e3d342834abe8fde7f5983a80.tar.gz |
Bug 46664 - xscope prints only half the characters in 16-bit strings
https://bugs.freedesktop.org/show_bug.cgi?id=46664
The length fields for PolyText16 and ImageText16 represent the number of
16-bit characters in the request but PrintString16() and PrintTString16()
treat the lengths as the number of octets in the string - thus printing
only half of the characters.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | prtype.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -928,7 +928,7 @@ PrintString16( return(0); fprintf(stdout, "%s%20s: \"", Leader, name); - for (i = 0; i < number; i += 2) + for (i = 0; i < number*2; i += 2) { c = IChar2B(&buf[i]); fprintf(stdout, "%s", printrep(c)); @@ -978,7 +978,7 @@ PrintTString16( if (TranslateText) off = 0x20; fprintf(stdout, "%s%20s: \"", Leader, name); - for (i = 0; i < number; i += 2) + for (i = 0; i < number*2; i += 2) { c = IChar2B(&buf[i]); fprintf(stdout, "%s", printrep(c + off)); |