97c6af7
From 73c378eee326ea117c7acc4655e89529a4171f92 Mon Sep 17 00:00:00 2001
97c6af7
From: vcrhonek <vcrhonek@fedoraproject.org>
97c6af7
Date: Wed, 27 Aug 2014 13:36:26 +0200
97c6af7
Subject: [PATCH 03/14] fix unprintable
97c6af7
97c6af7
original dist-git commit: cd7e072c
97c6af7
Resolves: #233525
97c6af7
97c6af7
---
97c6af7
 tw.parse.c | 3 ++-
97c6af7
 1 file changed, 2 insertions(+), 1 deletion(-)
97c6af7
97c6af7
diff --git a/tw.parse.c b/tw.parse.c
97c6af7
index dc32dba..d05ceb8 100644
97c6af7
--- a/tw.parse.c
97c6af7
+++ b/tw.parse.c
97c6af7
@@ -2169,7 +2169,8 @@ print_by_column(Char *dir, Char *items[], int count, int no_file_suffix)
cd7e072
 	     (Strchr(val, 'x') != NULL);
cd7e072
 
cd7e072
     for (i = 0; i < count; i++)	{ /* find widest string */
cd7e072
-	maxwidth = max(maxwidth, (unsigned int) NLSStringWidth(items[i]));
cd7e072
+        if (NLSStringWidth(items[i]) != -1)
cd7e072
+	    maxwidth = max(maxwidth, (unsigned int) NLSStringWidth(items[i]));
cd7e072
     }
cd7e072
 
cd7e072
     maxwidth += no_file_suffix ? 1 : 2;	/* for the file tag and space */
97c6af7
-- 
97c6af7
1.9.3
97c6af7