summary refs log tree commit diff stats
path: root/src/common/cfgfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/cfgfiles.c')
-rw-r--r--src/common/cfgfiles.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 8283765b..7d0e9c91 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -1085,12 +1085,10 @@ set_showval (session *sess, const struct prefs *var, char *tbuf)
 
 	len = strlen (var->name);
 	memcpy (tbuf, var->name, len);
-	dots = 29 - len;
-
-	if (dots < 0)
-	{
+	if (len > 29)
 		dots = 0;
-	}
+	else
+		dots = 29 - len;
 
 	tbuf[len++] = '\003';
 	tbuf[len++] = '2';