Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_entry.c
Log Message:
Fix for NULL format reported by HandyAndE.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_entry.c 11 Mar 2005 15:20:53 -0000 1.2
+++ ewl_entry.c 11 Mar 2005 21:26:28 -0000 1.3
@@ -1764,16 +1764,22 @@
DENTER_FUNCTION(DLEVEL_STABLE);
format = evas_object_textblock_format_current_get(e->textobj);
- sscanf(format, "font=%s", of);
- sscanf(format, "size=%d", &size);
+ if (format) {
+ sscanf(format, "font=%s", of);
+ sscanf(format, "size=%d", &size);
+ }
+ else {
+ of[0] = '\0';
+ size = 1;
+ }
snprintf(nformat, PATH_MAX, "font=%s size=%d", opf->font, opf->size);
evas_object_textblock_format_insert(e->textobj, nformat);
- FREE(format);
+ IF_FREE(format);
FREE(opf->font);
- opf->font = of;
+ opf->font = strdup(of);
opf->size = size;
DLEAVE_FUNCTION(DLEVEL_STABLE);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs