mk_wcwidth.c: nit

This commit is contained in:
Jonathan Daugherty 2020-03-05 11:07:08 -08:00
parent a247079058
commit 904a5b1040

View File

@ -230,7 +230,7 @@ HsInt builtin_wcwidth(HsChar ucs)
HsInt vty_mk_wcwidth(HsChar ch)
{
if (custom_table != NULL) {
if (ch >= 0 && ch < custom_table_size) {
if ((ch >= 0) && (ch < custom_table_size)) {
return custom_table[ch];
} else {
return 0;