]> granicus.if.org Git - nethack/commitdiff
unicode follow up
authornethack.allison <nethack.allison>
Wed, 18 Oct 2006 03:51:54 +0000 (03:51 +0000)
committernethack.allison <nethack.allison>
Wed, 18 Oct 2006 03:51:54 +0000 (03:51 +0000)
attr value was only getting one byte allocated instead
of 1 * sizeof(nhwchar), so add required paranthesis.

win/tty/wintty.c

index 82e5eacd9b83cb64584e96a102098ed741dd2a15..a24af4d5b5213dce0bb9b4643c5c5f754f9833d4 100644 (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);