From 544eb3b1f12b80604b0d7e33db8b67cae37754bb Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 18 Oct 2003 21:13:15 +0000 Subject: [PATCH] * g3.c: Read 9+3 bytes, rounded up to the next full 4. instead of just fixed 12. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6844 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ricoh/g3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ricoh/g3.c b/camlibs/ricoh/g3.c index d2c0a17fc..6da1da1a4 100644 --- a/camlibs/ricoh/g3.c +++ b/camlibs/ricoh/g3.c @@ -99,7 +99,7 @@ g3_channel_read_bytes( int rest = expected; if (rest > 65536) rest = 65536; - ret = gp_port_read(port, xbuf, rest + 12); + ret = gp_port_read(port, xbuf, (rest + 9 + 3) & ~3); if (ret < GP_OK) { gp_log(GP_LOG_ERROR, "g3", "read error in g3_channel_read\n"); return ret;