diff options
Diffstat (limited to 'term_ascii.c')
-rw-r--r-- | term_ascii.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/term_ascii.c b/term_ascii.c index 64f9f686..1b3040a0 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.34 2014/10/26 17:12:03 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.35 2014/10/26 18:07:28 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -236,9 +236,11 @@ ascii_uc2str(int uc) "j", "DZ", "D", "dz", "G", "g", "HV", "W", "N", "n", "A", "a", "AE", "ae", "O", "o"}; - if (uc < 0 || (size_t)uc >= sizeof(tab)/sizeof(tab[0])) + if (uc < 0) return("<?>"); - return(tab[uc]); + if ((size_t)uc < sizeof(tab)/sizeof(tab[0])) + return(tab[uc]); + return(mchars_uc2str(uc)); } static size_t |