From: Martin Ling Date: Mon, 4 Nov 2013 02:16:21 +0000 (+0000) Subject: Fix enumeration on Windows. X-Git-Tag: libserialport-0.1.0~140 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d9573bad9adba41607514c803e2b1fce3c8d79ec;p=libserialport.git Fix enumeration on Windows. --- diff --git a/serialport.c b/serialport.c index 7022a9d..5b5739d 100644 --- a/serialport.c +++ b/serialport.c @@ -144,7 +144,7 @@ int sp_list_ports(struct sp_port ***list_ptr) goto out_free_value; } while ( - value_len = max_value_len, + value_len = max_value_len + 1, data_size = max_data_size, RegEnumValue(key, index, value, &value_len, NULL, &type, (LPBYTE)data, &data_size) == ERROR_SUCCESS)