projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Deal with the warnings generated when passing a pointer-to-enum to
[u/mdw/putty]
/
unix
/
pterm.c
diff --git
a/unix/pterm.c
b/unix/pterm.c
index
e6446a0
..
58f9846
100644
(file)
--- a/
unix/pterm.c
+++ b/
unix/pterm.c
@@
-1067,9
+1067,11
@@
void do_text(Context ctx, int x, int y, char *text, int len,
}
if (lattr != LATTR_NORM) {
- if (x*2 >= cols)
- return;
x *= 2;
+ if (x >= cols)
+ return;
+ if (x + len*2 > cols)
+ len = (cols-x)/2; /* trim to LH half */
}
gdk_gc_set_foreground(gc, &inst->cols[nbg]);