@@ -249,7 +249,7 @@ HsInt vty_mk_wcwidth(HsChar ch)
249249// This allocates a new character width table of the specified size
250250// (in characters). If a custom table has already been allocated, this
251251// returns 1. Otherwise it allocates a new table, initializes all of its
252−// entries to zero, and returns zero.
252+// entries to 1, and returns zero.
253253//
254254// Note that this does *not* mark the table as ready for use. Until the
255255// table is marked ready, it will not be used by vty_mk_wcwidth. To mark
@@ -261,7 +261,7 @@ int vty_init_custom_table(int size)
261261 if (size > 0 && size <= MAX_CUSTOM_TABLE_SIZE) {
262262 custom_table_ready = 0;
263263 custom_table = malloc(size);
264− bzero(custom_table, size);
264+ memset(custom_table, 1, size);
265265 custom_table_size = size;
266266 return 0;
267267 } else {