From: Enlightenment C. <no...@cv...> - 2007-01-07 21:25:52
|
Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl Dir : e17/libs/ewl/src/lib Modified Files: ewl_engines.c Log Message: Stricter checks on engine names in listing. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- ewl_engines.c 4 Jan 2007 05:09:47 -0000 1.34 +++ ewl_engines.c 8 Jan 2007 03:25:51 -0000 1.35 @@ -85,13 +85,17 @@ ecore_list_goto_first(files); while ((file = ecore_list_next(files))) { - int len; + char *ext; - len = strlen(file); - if (!strncmp(file + (len - 3), ".so", 3)) + ext = strchr(file, '.'); + if (ext) { - file[len - 3] = '\0'; - ecore_list_append(names, strdup(file)); + char *lastext; + lastext = strrchr(file, '.'); + if (!strncmp(lastext, ".so", 3) && ext == lastext) { + *ext = '\0'; + ecore_list_append(names, strdup(file)); + } } } ecore_list_destroy(files); |