From cea010dce0c7e507d160612a968b2e1fa72f9474 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 13 Mar 2014 12:33:35 -0400 Subject: [PATCH] bugfix: don't crash when saving screenshots with no file extension CID 1132744 --- src/modules/shot/e_mod_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 718f748a2..d6a3b6a67 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -162,10 +162,9 @@ _screen_change_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even static void _save_to(const char *file) { - char *extn = strrchr(file, '.'); char opts[256]; - if (!strcasecmp(extn, ".png")) + if (eina_str_has_extension(file, ".png")) snprintf(opts, sizeof(opts), "compress=%i", 9); else snprintf(opts, sizeof(opts), "quality=%i", quality);