StackExchange / wmi

WMI for Go
http://godoc.org/github.com/StackExchange/wmi
MIT License
433 stars 173 forks source link

fix support for slices #41

Closed demonix closed 5 years ago

demonix commented 6 years ago

Hi! Looks like previous PR https://github.com/StackExchange/wmi/pull/38 breaks functionality from PR https://github.com/StackExchange/wmi/pull/19. String arrays, like IP addreses from Win32_NetworkAdapterConfiguration are empty now.

I've tried to understand what's wrong and found, that prop.Value() for array is nil, but prop type is VT_ARRAY, so I've changed condition to check if prop is actually VT_NULL.

It works on my machine (c), but I'm not a golang guru, so please double check, if I break something else.