Bug in ftd2xx.c driver

I’m new at OpenOCD so please forgive me if this is the wrong place to submit bugs/patches.

I think the following code at line 372 of the ftd2xx.c file is incorrect:

BUFFER_ADD = (num_bytes-2) & 0xff;

BUFFER_ADD = (num_bytes >> 8) & 0xff;

I believe the second line should be ((num_bytes-2) >> 8) & 0xFF

This will only make a difference if num_bytes is near a multiple of 256, but…it could happen.

Hello,

of course you’re right. I’ll fix it in the next SVN version.

Patches can also be submitted at http://developer.berlios.de/patch/?group_id=4148

Regards,

Dominic