Author: manolo
Date: 2010-12-07 10:25:15 -0800 (Tue, 07 Dec 2010)
New Revision: 7970
Log:
Fix STR #2470. Don't call Xutf8TextPropertyToTextList if X_HAVE_UTF8_STRING
isn't defined
Modified:
branches/branch-1.3/src/Fl_x.cxx
Modified: branches/branch-1.3/src/Fl_x.cxx
===================================================================
--- branches/branch-1.3/src/Fl_x.cxx 2010-12-07 16:00:16 UTC (rev 7969)
+++ branches/branch-1.3/src/Fl_x.cxx 2010-12-07 18:25:15 UTC (rev 7970)
@@ -955,14 +955,19 @@
text_prop.encoding=actual;
text_prop.nitems=count;
char **text_list;
+#ifndef X_HAVE_UTF8_STRING
+ text_list = (char**)&portion;
+#else
int list_count;
- Xutf8TextPropertyToTextList(fl_display,
- + (const
XTextProperty*)&text_prop, &text_list, &list_count);
+ Xutf8TextPropertyToTextList(fl_display, (const
XTextProperty*)&text_prop, &text_list, &list_count);
+#endif
int bytesnew = strlen(*text_list)+1;
- XFree(portion);
buffer = (unsigned char*)realloc(buffer, bytesread+bytesnew+remaining);
memcpy(buffer+bytesread, *text_list, bytesnew);
+ XFree(portion);
+#ifdef X_HAVE_UTF8_STRING
XFreeStringList(text_list);
+#endif
bytesread += bytesnew - 1;
if (!remaining) break;
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit