From 671644ff41fe7bc367adc7556b81eef39821ff15 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 12 May 2013 11:58:34 -0700 Subject: [PATCH] Avoid passing negative values (i.e. signed characters) to isprint() which is not happy with doing this on some platforms. --- sim_tmxr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 27fa6acb..25536e53 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -3665,7 +3665,7 @@ for (j=0; 1; ++j) { } } -static int tmxr_buf_debug_telnet_options (char *buf, int bufsize) +static int tmxr_buf_debug_telnet_options (u_char *buf, int bufsize) { int optsize = 2; @@ -3698,7 +3698,7 @@ if ((lp->mp->dptr) && (dbits & lp->mp->dptr->dctrl)) { for (i=0; imp->dptr) && (dbits & lp->mp->dptr->dctrl)) { tmxr_buf_debug_string ("_TN_LF_"); break; default: - if (isprint(buf[i])) + if (isprint((u_char)buf[i])) tmxr_buf_debug_char (buf[i]); else { tmxr_buf_debug_char ('_');