mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[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:
committed by
GitHub
parent
12ee8fda7b
commit
8b3663d2b6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user