aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/table.c b/table.c
index e996570..5c41c89 100644
--- a/table.c
+++ b/table.c
@@ -510,8 +510,9 @@ int
visible_length_plain(char *str)
{
int len = 0, max_len = 0;
+ char *strz = str + strlen(str);
- while (*str) {
+ while (str < strz) {
if (*str == '\t') {
do {
len++;