Revert "Prevent overflow beyond the end of string in visible_length_plain()"

This reverts commit f763b8ebf5.
This commit is contained in:
Tatsuya Kinoshita
2016-12-15 22:45:48 +09:00
parent 3eab80f2a1
commit 3cb0915076

View File

@@ -510,9 +510,8 @@ int
visible_length_plain(char *str) visible_length_plain(char *str)
{ {
int len = 0, max_len = 0; int len = 0, max_len = 0;
char *strz = str + strlen(str);
while (str < strz) { while (*str) {
if (*str == '\t') { if (*str == '\t') {
do { do {
len++; len++;