]> granicus.if.org Git - mutt/commitdiff
Try to fix nonprintable character input.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 3 Jan 2001 10:52:45 +0000 (10:52 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 3 Jan 2001 10:52:45 +0000 (10:52 +0000)
enter.c

diff --git a/enter.c b/enter.c
index ccf0bd690805527d78360f257d0fd848d1fc6eed..8509faf8698785de7cb4f5ccc30f228eefdccb38 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -36,7 +36,7 @@ enum
 static int my_wcwidth (wchar_t wc)
 {
   int n = wcwidth (wc);
-  if (n > 0)
+  if (IsWPrint (wc) && n > 0)
     return n;
   if (!(wc & ~0x7f))
     return 2;
@@ -56,7 +56,7 @@ static int my_wcswidth (const wchar_t *s, size_t n)
 static int my_addwch (wchar_t wc)
 {
   int n = wcwidth (wc);
-  if (n > 0)
+  if (IsWPrint (wc) && n > 0)
     return mutt_addwch (wc);
   if (!(wc & ~0x7f))
     return printw ("^%c", ((int)wc + 0x40) & 0x7f);