From 4300a99631ca89130c9672937eeec48d5aff92ae Mon Sep 17 00:00:00 2001 From: Philip Heron Date: Tue, 29 Jun 2010 19:10:55 +0100 Subject: [PATCH] Get image length from the proper bytes --- c328.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c328.c b/c328.c index d7de6f6..5437857 100644 --- a/c328.c +++ b/c328.c @@ -147,7 +147,7 @@ char c3_get_picture(uint8_t pt, uint16_t *length) if(c3_rx(PIC_TIMEOUT) != CMD_DATA) return(-1); /* Get the file size from the DATA args */ - *length = rxbuf[9] + (rxbuf[10] << 8); + *length = rxbuf[3] + (rxbuf[4] << 8); return(0); }