On Fri, May 9, 2014 at 11:29 AM, Alexandre Julliard <julliard(a)winehq.org> wrote:
Bruno Jesus <00cpxxx(a)gmail.com> writes:
@@ -1241,8 +1250,9 @@ BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, LPSTR lpszConnectio dwReserved); if (rc && lpwszConnectionName) { - WideCharToMultiByte(CP_ACP,0,lpwszConnectionName,-1,lpszConnectionName, - dwNameLen, NULL, NULL); + if (WideCharToMultiByte(CP_ACP,0,lpwszConnectionName,-1,lpszConnectionName, + dwNameLen, NULL, NULL) == 0) + *lpszConnectionName = '\0';
That doesn't seem to match what the W function does, and I don't see any tests for that case.
Hi, thanks for the review =) I'm not at home so I can't check it more carefully but judging by the patch I think this is the test: + buffer[0] = 0xDE; + res = pInternetGetConnectedStateExA(&flags, buffer, 1, 0); ok(res == TRUE, "Expected TRUE, got %d\n", res); ok(flags, "Expected at least one flag set\n"); ok(strlen(buffer) == 0, "Expected 0 bytes, got %u\n", lstrlenA(buffer)); It sets some content inside the buffer and then ensures the string is zero sized after returning. As far as I remember if you comment the line "*lpszConnectionName = '\0'" one or more tests will result in error. I can do a more careful research at the weekend if you wish. Best wishes, Bruno