From 84a20498551932b81b0ff0cabb3fdfde23bdbc8d Mon Sep 17 00:00:00 2001 From: Theodore Kilgore Date: Wed, 18 May 2005 19:01:57 +0000 Subject: [PATCH] * library.c: bug in compressed photo routine fixed, found by Cedric Cell ier. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8009 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/sq905/ChangeLog | 6 ++++++ camlibs/sq905/library.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/camlibs/sq905/ChangeLog b/camlibs/sq905/ChangeLog index e5fc7c5b4..a9e4ef124 100644 --- a/camlibs/sq905/ChangeLog +++ b/camlibs/sq905/ChangeLog @@ -1,3 +1,9 @@ +2005-05-18 Theodore Kilgore + + * library.c: bug in compressed photo routine fixed, found by Cedric Cellier. + + + 2005-04-17 Theodore Kilgore * ChangeLog: Fixed some typos. diff --git a/camlibs/sq905/library.c b/camlibs/sq905/library.c index 5a656d7db..1975de39c 100644 --- a/camlibs/sq905/library.c +++ b/camlibs/sq905/library.c @@ -356,12 +356,13 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, "# CREATOR: gphoto2, SQ905 library\n" "%d %d\n" "255\n", w, h); - ptr = ppm + strlen (ppm); + size = strlen (ppm); + ptr = ppm + size; if (comp_ratio>1) { sq_decompress (camera->pl->model, ptr, frame_data, w, h, entry); sq_postprocess(camera->pl,w, h, ptr, entry); } - size = strlen (ppm) + (w * h * 3); + size = size + (w * h * 3); GP_DEBUG ("size = %i\n", size); if ( comp_ratio == 1) {