From: Uwe Bonnes Date: Wed, 8 Sep 2010 17:07:48 +0000 (+0200) Subject: When reading EEPROM strings, clip active, as rollover doesn't work for the FT2232R X-Git-Tag: v1.0rc1~133^2~115 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=84ec032f8e8d467b87419a32435c120276d9a1ca When reading EEPROM strings, clip active, as rollover doesn't work for the FT2232R --- diff --git a/src/ftdi.c b/src/ftdi.c index 81fd2d5..3908615 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -2561,7 +2561,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, if (eeprom->manufacturer) { // Decode manufacturer - i = buf[0x0E]; // offset + i = buf[0x0E] & (eeprom_size -1); // offset for (j=0;jmanufacturer[j] = buf[2*j+i+2]; @@ -2580,7 +2580,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, if(eeprom->product) { // Decode product name - i = buf[0x10]; // offset + i = buf[0x10] & (eeprom_size -1); // offset for (j=0;jproduct[j] = buf[2*j+i+2]; @@ -2599,7 +2599,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size, if(eeprom->serial) { // Decode serial - i = buf[0x12]; // offset + i = buf[0x12] & (eeprom_size -1); // offset for (j=0;jserial[j] = buf[2*j+i+2];