git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
33e27ed
)
Fix wrong array access in set_ft232h_cbus()
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Tue, 14 Aug 2012 15:10:30 +0000 (17:10 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Tue, 14 Aug 2012 15:11:45 +0000 (17:11 +0200)
Changed code by Martin Devera <martin.devera@wifcom.cz>,
patch and commit log by Thomas Jarosch.
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
5a3d44e
..
95028e5
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-2409,9
+2409,9
@@
void set_ft232h_cbus(struct ftdi_eeprom *eeprom, unsigned char * output)
if (eeprom->cbus_function[2*i+1]> CBUSH_CLK7_5)
mode_high = CBUSH_TRISTATE;
else
- mode_high = eeprom->cbus_function[2*i];
+ mode_high = eeprom->cbus_function[2*i+1];
- output[0x18+i] = mode_high <<4 | mode_low;
+ output[0x18+i] = (mode_high <<4) | mode_low;
}
}
/* Return the bits for the encoded EEPROM Structure of a requested Mode