[196] in Zephyr_Bugs
decmips 7.2K: zwgc
daemon@ATHENA.MIT.EDU (Marc Horowitz)
Mon Dec 17 17:22:48 1990
To: bugs@ATHENA.MIT.EDU
Cc: bug-zephyr@ATHENA.MIT.EDU
Date: Mon, 17 Dec 90 17:22:24 EST
From: Marc Horowitz <marc@ATHENA.MIT.EDU>
System name: podge
Type and version: KN01 7.2K (1 update(s) to same version)
Display type: PM-MONO
What were you trying to do?
cut and paste high-bit characters
What's wrong:
char's should always be unsigned and aren't. The compiler is broken,
but I have a workaround :-)
What should have happened:
*** /afs/athena/astaff/project/zephyr/src/zwgc/xmark.c Thu Dec 7 17:35:31 1989
--- /tmp/xmark.c Mon Dec 17 17:16:51 1990
***************
*** 116,122 ****
xofs<x && i<xb->strlen;
i++,s++) {
/* if font->per_char is NULL, then we should use min_bounds */
! short usewidth = font->per_char ? font->per_char[*s - font->min_char_or_byte2].width : font->min_bounds.width;
if (x <= (xofs+=usewidth)) {
markchar[which]=i;
markpixel[which]=xofs - xb->x1 - usewidth;
--- 116,125 ----
xofs<x && i<xb->strlen;
i++,s++) {
/* if font->per_char is NULL, then we should use min_bounds */
! short usewidth = font->per_char ?
! font->per_char[*((unsigned char *)s) -
! font->min_char_or_byte2].width :
! font->min_bounds.width;
if (x <= (xofs+=usewidth)) {
markchar[which]=i;
markpixel[which]=xofs - xb->x1 - usewidth;
Note that this is a pretty serious bug: it can cause zwgc to crash and burn.
Please describe any relevant documentation references:
[Please replace this line with your information.]