[core] fix default listing of large SanDisk SSD devices

* Closes #2164
* Also add breakdown of score computation when device enumeration debug is active
* Also fix a minor Code Analysis warning in msapi_utf8.h
This commit is contained in:
Pete Batard 2023-02-13 13:31:40 +00:00
parent 3281f6b97e
commit b163b3dfe2
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 51 additions and 25 deletions

View file

@ -6,7 +6,7 @@
*
* See also: https://utf8everywhere.org
*
* Copyright © 2010-2022 Pete Batard <pete@akeo.ie>
* Copyright © 2010-2023 Pete Batard <pete@akeo.ie>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -359,7 +359,8 @@ static __inline int GetWindowTextU(HWND hWnd, char* lpString, int nMaxCount)
err = GetLastError();
}
wfree(lpString);
lpString[nMaxCount - 1] = 0;
if (lpString != NULL)
lpString[nMaxCount - 1] = 0;
SetLastError(err);
return ret;
}