From d9573bad9adba41607514c803e2b1fce3c8d79ec Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Mon, 4 Nov 2013 02:16:21 +0000 Subject: [PATCH] Fix enumeration on Windows. --- serialport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)