X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.c;h=39086159bd3c94a864d960822e5b16df3d8331cd;hp=81fd2d5bfd327ca2a4d02f32c97333c4daec78a5;hb=84ec032f8e8d467b87419a32435c120276d9a1ca;hpb=065edc587bed136ef4a1cca5980f116c69e9ae00 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];