From 8acb2ba35576c23adbee843d499bff90debf8a13 Mon Sep 17 00:00:00 2001 From: cedric Date: Wed, 14 Dec 2011 09:14:27 +0000 Subject: [PATCH] evas: fix ico loader use of Eina_File. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@66181 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/loaders/ico/evas_image_load_ico.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/loaders/ico/evas_image_load_ico.c b/src/modules/loaders/ico/evas_image_load_ico.c index 93a8a6b..a6727e2 100644 --- a/src/modules/loaders/ico/evas_image_load_ico.c +++ b/src/modules/loaders/ico/evas_image_load_ico.c @@ -101,7 +101,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = eina_file_open(file, EINA_FILE_SEQUENTIAL); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -112,6 +112,9 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res @@ -323,7 +326,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = eina_file_open(file, EINA_FILE_SEQUENTIAL); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -334,6 +337,9 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res -- 2.7.4