forked from enlightenment/enlightenment
bugfix: don't crash when saving screenshots with no file extension
CID 1132744
This commit is contained in:
parent
b9eaf4d239
commit
cea010dce0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue