tabbing: fix erroneous use of strnlenpt()
Names could be strings of multibyte characters, so they could be more than COLS - 1 bytes long and still be less than COLS - 1 columns wide.master
parent
92b8d6fb24
commit
06b1fcad13
|
@ -2848,7 +2848,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
|
|||
|
||||
/* Find the length of the longest among the choices. */
|
||||
for (match = 0; match < num_matches; match++) {
|
||||
size_t namelen = strnlenpt(matches[match], COLS - 1);
|
||||
size_t namelen = strlenpt(matches[match]);
|
||||
|
||||
if (namelen > longest_name)
|
||||
longest_name = namelen;
|
||||
|
|
Loading…
Reference in New Issue