reader: %lc wants wint_t, not wchar_t

pull/592/head
nick black 4 years ago
parent d2c968b948
commit b59f623249
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -44,8 +44,8 @@ bool ncreader_offer_input(ncreader* n, const ncinput* ni){
// FIXME handle backspace
// FIXME need to collect full EGCs
char wbuf[WCHAR_MAX_UTF8BYTES + 1];
// FIXME breaks for wchar_t < 32bits
if(snprintf(wbuf, sizeof(wbuf), "%lc", (wchar_t)ni->id) >= (int)sizeof(wbuf)){
// FIXME breaks for wint_t < 32bits
if(snprintf(wbuf, sizeof(wbuf), "%lc", (wint_t)ni->id) >= (int)sizeof(wbuf)){
return true;
}
if(ncplane_putegc(n->ncp, wbuf, NULL) < 0){

Loading…
Cancel
Save