[IMM32] ImmGetGuideLineAW: Fix return value for error (#8766)

The function has to return zero on error.
JIRA issue: CORE-19268
Return zero on error (in GGL_STRING and GGL_PRIVATE).
This commit is contained in:
Katayama Hirofumi MZ
2026-03-24 06:50:16 +09:00
committed by GitHub
parent 12ee8fda7b
commit 8b3663d2b6

View File

@@ -88,11 +88,16 @@ ImmGetGuideLineAW(
}
}
if (dwBufLen == 0 || cb == 0 || lpBuf == NULL || dwBufLen < cb)
if (dwBufLen == 0)
{
ret = cb;
goto Quit;
}
if (cb == 0 || lpBuf == NULL || dwBufLen < cb)
{
ret = 0; /* Error */
goto Quit;
}
/* store to buffer */
if (bAnsi)
@@ -149,11 +154,16 @@ ImmGetGuideLineAW(
}
}
if (dwBufLen == 0 || cb == 0 || lpBuf == NULL || dwBufLen < cb)
if (dwBufLen == 0)
{
ret = cb;
goto Quit;
}
if (cb == 0 || lpBuf == NULL || dwBufLen < cb)
{
ret = 0; /* Error */
goto Quit;
}
/* store to buffer */
if (bAnsi)