projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change a temporary buffer from unsigned chars to chars, avoiding a pointer-cast
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
1e0a9fe
..
d57218a
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-2983,7
+2983,7
@@
static void do_paint(Terminal *term, Context ctx, int may_optimise)
*/
if ((tchar | tattr) != (term->disptext[idx]& ~ATTR_NARROW)) {
if ((tattr & ATTR_WIDE) == 0 &&
*/
if ((tchar | tattr) != (term->disptext[idx]& ~ATTR_NARROW)) {
if ((tattr & ATTR_WIDE) == 0 &&
-
CharW
idth(ctx, (tchar | tattr) & 0xFFFF) == 2)
+
char_w
idth(ctx, (tchar | tattr) & 0xFFFF) == 2)
tattr |= ATTR_NARROW;
} else if (term->disptext[idx]&ATTR_NARROW)
tattr |= ATTR_NARROW;
tattr |= ATTR_NARROW;
} else if (term->disptext[idx]&ATTR_NARROW)
tattr |= ATTR_NARROW;
@@
-3251,12
+3251,12
@@
static void clipme(Terminal *term, pos top, pos bottom, int rect)
if (DIRECT_FONT(uc)) {
if (c >= ' ' && c != 0x7F) {
if (DIRECT_FONT(uc)) {
if (c >= ' ' && c != 0x7F) {
-
unsigned
char buf[4];
+ char buf[4];
WCHAR wbuf[4];
int rv;
if (is_dbcs_leadbyte(font_codepage, (BYTE) c)) {
buf[0] = c;
WCHAR wbuf[4];
int rv;
if (is_dbcs_leadbyte(font_codepage, (BYTE) c)) {
buf[0] = c;
- buf[1] =
(unsigned char)
ldata[top.x + 1];
+ buf[1] = ldata[top.x + 1];
rv = mb_to_wc(font_codepage, 0, buf, 2, wbuf, 4);
top.x++;
} else {
rv = mb_to_wc(font_codepage, 0, buf, 2, wbuf, 4);
top.x++;
} else {