summaryrefslogtreecommitdiffstats
path: root/core/serial_ftdi.c
diff options
context:
space:
mode:
authorGravatar Daniel Krupp <daniel.krupp@gmail.com>2018-11-18 17:27:14 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-11-18 20:01:28 +0200
commitc48056300d61987850dbe9ad92b20a293d03dc75 (patch)
tree8df43b748e32544ba436171233c48952fd898058 /core/serial_ftdi.c
parentb609b06b1160e3ff46eee3be81d26356f10d5985 (diff)
downloadsubsurface-c48056300d61987850dbe9ad92b20a293d03dc75.tar.gz
Fix Cressi interface ftdi opening bug
The Cressi specific PID was not used when serial_ftdi_open_device tried to open the device. Reported-by: Daniel Krupp Signed-off-by: Daniel Krupp <daniel.krupp@gmail.com>
Diffstat (limited to 'core/serial_ftdi.c')
-rw-r--r--core/serial_ftdi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/serial_ftdi.c b/core/serial_ftdi.c
index 084fb230f..89f48f01d 100644
--- a/core/serial_ftdi.c
+++ b/core/serial_ftdi.c
@@ -156,7 +156,7 @@ static int serial_ftdi_open_device (struct ftdi_context *ftdi_ctx)
0xF680, // Suunto
0x87D0, // Cressi (Leonardo)
};
- int num_accepted_pids = 6;
+ int num_accepted_pids = sizeof(accepted_pids) / sizeof(accepted_pids[0]);
int i, pid, ret;
for (i = 0; i < num_accepted_pids; i++) {
pid = accepted_pids[i];