From 3cb09150762bfc72b3b920ae76f8c50f6eb35fb0 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Thu, 15 Dec 2016 22:45:48 +0900 Subject: Revert "Prevent overflow beyond the end of string in visible_length_plain()" This reverts commit f763b8ebf5441cb44d2c0234565fadd5eb1c87a5. --- table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'table.c') diff --git a/table.c b/table.c index 5c41c89..e996570 100644 --- a/table.c +++ b/table.c @@ -510,9 +510,8 @@ int visible_length_plain(char *str) { int len = 0, max_len = 0; - char *strz = str + strlen(str); - while (str < strz) { + while (*str) { if (*str == '\t') { do { len++; -- cgit v1.2.3