From ba8fd78d6be0ccf4320948c291d4238e9b57eb0b Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 14 Jul 2012 18:31:43 +0000 Subject: Fix cast using both (unsigned char) and (int) to make sure that char values > 127 are *positive* int's. (STR #2726) --This line, and those below, will be ignored-- M fluid/Fl_Type.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Type.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index 9b4d88a1c..a27f27873 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -594,9 +594,9 @@ int storestring(const char *n, const char * & p, int nostrip) { undo_checkpoint(); int length = 0; if (n) { // see if blank, strip leading & trailing blanks - if (!nostrip) while (isspace((int) *n)) n++; + if (!nostrip) while (isspace((int)(unsigned char)*n)) n++; const char *e = n + strlen(n); - if (!nostrip) while (e > n && isspace((int)*(e-1))) e--; + if (!nostrip) while (e > n && isspace((int)(unsigned char)*(e-1))) e--; length = e-n; if (!length) n = 0; } -- cgit v1.2.3