Windows '_WTA' bug (#1624)

Every time the '_WTA' is called, its initial value is null, so the
function returns directly.


c98bb93514/src/apps/common/apputils.c (L905-L908)

c98bb93514/src/apps/common/apputils.c (L939-L941)

c98bb93514/src/apps/common/apputils.c (L960-L962)

c98bb93514/src/apps/common/apputils.c (L981-L983)
This commit is contained in:
guoyingbo 2025-01-05 09:50:29 +08:00 committed by GitHub
parent c98bb93514
commit 22aae5d0d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -903,7 +903,7 @@ char *dirname(char *path) {
* \return
*/
static char *_WTA(__in wchar_t *pszInBuf, __in int nInSize, __out char **pszOutBuf, __out int *pnOutSize) {
if (!pszInBuf || !pszOutBuf || !*pszOutBuf || !pnOutSize || nInSize <= 0) {
if (!pszInBuf || !pszOutBuf || !pnOutSize || nInSize <= 0) {
return NULL;
}
*pnOutSize = WideCharToMultiByte((UINT)0, (DWORD)0, pszInBuf, nInSize, NULL, 0, NULL, NULL);