Enlightenment CVS committal Author : codewarrior Project : e17 Module : libs/esmart
Dir : e17/libs/esmart/src/lib/esmart_textarea Modified Files: esmart_textarea_cursor.c Log Message: NOTE TO SELF: Never use sprintf, always use snprinft to avoid evil seggies! =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_textarea/esmart_textarea_cursor.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- esmart_textarea_cursor.c 7 Apr 2005 11:12:22 -0000 1.6 +++ esmart_textarea_cursor.c 5 May 2005 21:41:33 -0000 1.7 @@ -158,8 +158,8 @@ int formats = evas_object_textblock_format_next_count_get(t->text); while(formats >= 0) { - char format[100]; - sprintf(format,"%s",evas_object_textblock_format_next_get(t->text, formats)); + char format[4096]; + snprintf(format,"%s",evas_object_textblock_format_next_get(t->text, formats)); if(!strcmp(format,"\n")) { evas_object_textblock_cursor_pos_set(t->text, pos+1); @@ -184,8 +184,8 @@ int formats = evas_object_textblock_format_prev_count_get(t->text); while(formats >= 0) { - char format[100]; - sprintf(format,"%s",evas_object_textblock_format_prev_get(t->text, formats)); + char format[4096]; + snprintf(format,4096,"%s",evas_object_textblock_format_prev_get(t->text, formats)); if(!strcmp(format,"\n")) { evas_object_textblock_cursor_pos_set(t->text, pos-1); ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs