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;