[PATCH 1/2] msvcp140: Implement _Temp_get.

Thomas Faber thomas.faber at reactos.org
Sat Dec 9 04:10:48 CST 2017


On 2017-12-08 21:15, Stefan Dösinger wrote:
> +    memset(path, 0xaa, sizeof(path));
> +    retval = p_Temp_get(path);
> +    ok(retval == path, "_Temp_get(): Got %p, expected %p\n", retval, path);
> +    ok(!wcscmp(path, temp_path), "Expected path %s, got %s\n", wine_dbgstr_w(temp_path), wine_dbgstr_w(path));
> +    len = wcslen(path);
> +    ok(!path[len], "Expected a 0 terminated string\n");

This check can never fail. Perhaps len < _countof(path) or using a
wcsnlen-style function above would make sense instead?

Best,
Thomas



More information about the wine-devel mailing list