kernel32: WideCharToMultiByte: return error on negative dest len
Alexandre Julliard
julliard at winehq.org
Mon Mar 24 07:25:54 CDT 2008
"Dan Kegel" <dank at kegel.com> writes:
> +static void test_negative_dest_length(void)
> +{
> + int len;
> + char buf[10];
> +
> + /* Test return on negative dest length */
> + SetLastError( 0xdeadbeef );
> + memset(buf,'x',sizeof(buf));
> + len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, -1, NULL, NULL);
> + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER,
> + "WideCharToMultiByte(destlen -1): len=%d error=%x\n", len, GetLastError());
If you want to determine the behavior for negative values you have to
test more than just -1, it may well be special.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list