mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 07:45:21 +00:00
One more change to getcchar(): Add the trailing zero only if the text of
the cchar_t isn't already zero (i.e., write at most one zero to the destination wchar_t string).
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#undef delay_output
|
||||
#undef flushinp
|
||||
|
||||
RCSID("$Id: util.c,v 1.39 2006/07/10 21:20:51 wmcbrine Exp $");
|
||||
RCSID("$Id: util.c,v 1.40 2006/07/11 17:21:23 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -255,7 +255,8 @@ int getcchar(const cchar_t *wcval, wchar_t *wch, attr_t *attrs,
|
||||
*attrs = (*wcval & (A_ATTRIBUTES & ~A_COLOR));
|
||||
*color_pair = PAIR_NUMBER(*wcval & A_COLOR);
|
||||
|
||||
*++wch = L'\0';
|
||||
if (*wch != L'\0')
|
||||
*++wch = L'\0';
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user