diff options
| author | Phan Trinh Ha <[email protected]> | 2024-05-08 16:15:16 -0700 |
|---|---|---|
| committer | Wei Mao <[email protected]> | 2024-05-16 10:51:04 -0700 |
| commit | e62672f9193b18c30067e2a239839c8bc89d1346 (patch) | |
| tree | ae2b162bd4de9bcff20c6613db38d31934432ec1 | |
| parent | a74a241c664c4e1d7c0838287b34076c19d9858a (diff) | |
Init commit
| -rw-r--r-- | hid/firefly/sauron/Sauron.cpp | 6 | ||||
| -rw-r--r-- | hid/hclient/ecdisp.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/hid/firefly/sauron/Sauron.cpp b/hid/firefly/sauron/Sauron.cpp index 16cb12d4..36ef367b 100644 --- a/hid/firefly/sauron/Sauron.cpp +++ b/hid/firefly/sauron/Sauron.cpp @@ -445,7 +445,7 @@ HRESULT CSauron::WzToColor(const WCHAR *pwszColor, COLORREF *pcrColor) return E_POINTER; } - if (0 == lstrlenW(pwszColor)) + if (0 == wcslen(pwszColor)) { //Empty color string passed in return E_INVALIDARG; @@ -457,7 +457,7 @@ HRESULT CSauron::WzToColor(const WCHAR *pwszColor, COLORREF *pcrColor) return E_POINTER; } - if (lstrlenW(pwszColor) != 7) + if (wcslen(pwszColor) != 7) { //hex color string is not of the correct length return E_INVALIDARG; @@ -534,5 +534,3 @@ inline DWORD CSauron::SwapBytes(DWORD dwRet) { return ((dwRet & 0x0000FF00) | ((dwRet & 0x00FF0000) >> 16) | ((dwRet & 0x000000FF) << 16)); } - - diff --git a/hid/hclient/ecdisp.c b/hid/hclient/ecdisp.c index 0d15774f..28433aea 100644 --- a/hid/hclient/ecdisp.c +++ b/hid/hclient/ecdisp.c @@ -3588,8 +3588,7 @@ bSetDataDlgProc( break; } - #pragma prefast(suppress: 28750, "Banned API check.") - CharUpperBuff(DataString, lstrlen(DataString)); + CharUpperBuff(DataString, (DWORD)strlen(DataString)); if (0 == lstrcmp(DataString, "TRUE")) { |
