The branch, master has been updated
via 6335545d29051b1de8d2d482c25a3c1e2e4ff62c (commit)
from 5432fb9b91bbf55af39c4c128772ad00852e62ec (commit)
- Log -----------------------------------------------------------------
commit 6335545d29051b1de8d2d482c25a3c1e2e4ff62c
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date: Tue Mar 17 21:51:37 2009 +0100
Fix eeprom decoding of BM chip type: The previous code resulted in a
temporary 1 byte variable which is too small to hold the values
-----------------------------------------------------------------------
Summary of changes:
src/ftdi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/ftdi.c b/src/ftdi.c
index b67f950..c62ede7 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -1954,7 +1954,8 @@ int ftdi_eeprom_decode(struct ftdi_eeprom *eeprom,
unsigned char *buf, int size)
// Addr 04: Product ID
eeprom->product_id = buf[0x04] + (buf[0x05] << 8);
- switch (buf[0x06] + (buf[0x07]<<8))
+ value = buf[0x06] + (buf[0x07]<<8);
+ switch (value)
{
case 0x0400:
eeprom->BM_type_chip = 1;
hooks/post-receive
--
A library to talk to FTDI chips
--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|