mscan: use wint_t for %lc

%lc arguments in fprintf are of type wint_t, not wchar_t.

Reported by Léo Villeveygoux.
pull/37/head
Leah Neukirchen 7 years ago
parent 1fbebe4d16
commit b2e97e6cfe

@ -46,7 +46,7 @@ u8putstr(FILE *out, char *s, ssize_t l, int pad)
s++; s++;
l--; l--;
} else if ((unsigned)*s < 32 || *s == 127) { // C0 } else if ((unsigned)*s < 32 || *s == 127) { // C0
fprintf(out, "%lc", *s == 127 ? 0x2421 : 0x2400+*s); fprintf(out, "%lc", (wint_t)(*s == 127 ? 0x2421 : 0x2400+*s));
s++; s++;
l--; l--;
} else { } else {
@ -59,7 +59,7 @@ u8putstr(FILE *out, char *s, ssize_t l, int pad)
s += r; s += r;
l -= wcwidth(wc); l -= wcwidth(wc);
if (l >= 0) if (l >= 0)
fprintf(out, "%lc", wc); fprintf(out, "%lc", (wint_t)wc);
} }
} }
if (pad) if (pad)

Loading…
Cancel
Save