You need to ensure the file->relname string is at least 4 characters long, or this will read invalid memory. Best solution here is to use the existing BLI_testextensie utility function.
On Sat, Nov 2, 2013 at 6:58 PM, jens verwiebe <[email protected]> wrote: > Revision: 61064 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61064 > Author: jensverwiebe > Date: 2013-11-02 17:58:53 +0000 (Sat, 02 Nov 2013) > Log Message: > ----------- > OSX: give application bundles an own icon to better differentiate vs. folders > > Modified Paths: > -------------- > trunk/blender/source/blender/editors/space_file/file_draw.c > > Modified: trunk/blender/source/blender/editors/space_file/file_draw.c > =================================================================== > --- trunk/blender/source/blender/editors/space_file/file_draw.c 2013-11-02 > 13:11:06 UTC (rev 61063) > +++ trunk/blender/source/blender/editors/space_file/file_draw.c 2013-11-02 > 17:58:53 UTC (rev 61064) > @@ -251,6 +251,11 @@ > if (strcmp(file->relname, "..") == 0) { > return ICON_FILE_PARENT; > } > +#ifdef __APPLE__ > + if (strcmp(&file->relname[strlen(file->relname) - 4], ".app") > == 0) { > + return ICON_UGLYPACKAGE; > + } > +#endif > if (file->flags & BLENDERFILE) { > return ICON_FILE_BLEND; > } > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
