Author: AlbrechtS
Date: 2012-07-14 11:31:43 -0700 (Sat, 14 Jul 2012)
New Revision: 9635
Log:
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
Modified:
branches/branch-1.3/fluid/Fl_Type.cxx
Modified: branches/branch-1.3/fluid/Fl_Type.cxx
===================================================================
--- branches/branch-1.3/fluid/Fl_Type.cxx 2012-07-04 18:58:48 UTC (rev
9634)
+++ branches/branch-1.3/fluid/Fl_Type.cxx 2012-07-14 18:31:43 UTC (rev
9635)
@@ -594,9 +594,9 @@
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;
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit