This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 3ae34478305da75d4c561719c3f458a6814a8b78 (commit) from c23cf7d15a7d1535d837b81022cc9d41ac095f2f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/3ae34478305da75d4c561719c3f458a6814a8...
commit 3ae34478305da75d4c561719c3f458a6814a8b78 Author: Cyril Hrubis metan@ucw.cz Date: Sun Apr 7 19:47:32 2013 +0200
libs: loaders: GP_Load() Fix.
Return NULL when extension loader failed and signature loader matches the extension loader.
This fixes the wrong extension warning once for all.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_Loader.c b/libs/loaders/GP_Loader.c index f084576..07ef69c 100644 --- a/libs/loaders/GP_Loader.c +++ b/libs/loaders/GP_Loader.c @@ -277,15 +277,15 @@ GP_Context *GP_LoadImage(const char *src_path, GP_ProgressCallback *callback) return img; }
+ sig_load = loader_by_signature(src_path); + /* - * Avoid further work if signature was correct but the loader issued - * ENOSYS or ECANCELED. + * Avoid further work if extension matches the signature but image + * couldn't be loaded. Probably unimplemented format or damaged file. */ - if (ext_load != NULL && (errno == ENOSYS || errno == ECANCELED)) + if (ext_load == sig_load) return NULL;
- sig_load = loader_by_signature(src_path); - if (ext_load && sig_load) { GP_WARN("File '%s': Extension says %s but signature %s", src_path, ext_load->fmt_name, sig_load->fmt_name);
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_Loader.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.