[PATCH 1/2] msvcp140: Implement _Temp_get.

Stefan Dösinger stefan at codeweavers.com
Sat Dec 9 05:24:22 CST 2017


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.




More information about the wine-devel mailing list