discomfitor pushed a commit to branch enlightenment-0.18.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=1599672d87dbb49e34f53625ce0a377359539c88

commit 1599672d87dbb49e34f53625ce0a377359539c88
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Mar 13 12:33:35 2014 -0400

    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 4d990db..ba4a427 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);

-- 


Reply via email to