Merge branch 'dev' into rust-line-endings

This commit is contained in:
Sean OMeara 2023-03-02 07:05:40 +01:00 committed by GitHub
commit 3debadf90a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View file

@ -850,12 +850,14 @@ void WindowsEthernetTap::setFriendlyName(const char *dn)
NETCON_PROPERTIES *ncp = nullptr;
nc->GetProperties(&ncp);
GUID curId = ncp->guidId;
if (curId == _deviceGuid) {
wchar_t wtext[255];
mbstowcs(wtext, dn, strlen(dn)+1);
nc->Rename(wtext);
found = true;
if (ncp != nullptr) {
GUID curId = ncp->guidId;
if (curId == _deviceGuid) {
wchar_t wtext[255];
mbstowcs(wtext, dn, strlen(dn)+1);
nc->Rename(wtext);
found = true;
}
}
nc->Release();
}

3
zeroidc/.gitattributes vendored Normal file
View file

@ -0,0 +1,3 @@
# disable autocrlf because it doesn't mix well with
# vendored rust packages
* text=false