From 84ec032f8e8d467b87419a32435c120276d9a1ca Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 8 Sep 2010 19:07:48 +0200 Subject: [PATCH] When reading EEPROM strings, clip active, as rollover doesn't work for the FT2232R --- src/ftdi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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]; -- 1.7.1