Am 2017-12-09 um 11:10 schrieb Thomas Faber:
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?
You are right, it is pointless. The wcscmp should take care of checking the 0 byte already actually, so I think I'll just remove it, but keep the check for len + 1.