unicode follow up

attr value was only getting one byte allocated instead
of 1 * sizeof(nhwchar), so add required paranthesis.
This commit is contained in:
nethack.allison
2006-10-18 03:51:54 +00:00
parent c19017a91b
commit 600697fadf

View File

@@ -2067,7 +2067,7 @@ tty_putstr_core(window, attr, symstr)
n0 = strlen(str) + 1;
#endif
ob = cw->data[cw->cury] = (nhwchar *)alloc(sizeof(nhwchar) * (unsigned)n0 + 1);
ob = cw->data[cw->cury] = (nhwchar *)alloc(sizeof(nhwchar) * ((unsigned)n0 + 1));
*ob++ = (nhwchar)(attr + 1); /* avoid nuls, for convenience */
#ifdef UNICODE_WIDEWINPORT
(void)nhwcpy(ob, symstr);