Actually, it turns out the above program is correct. The repeated bytes were due to an electrical problem -- ringing on the WR# pin. I followed FTDI's recommendation in their debugging application note and connected to the pin through a 47 ohm resistor; now everything works fine.
-- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com