Francois Gouget : advapi32/tests: Don't check the content of the buffer if ReadEventLog() fails.
Module: wine Branch: master Commit: 0e44c658b6d1e3ad87f0fe58e75910a95c10f015 URL: https://gitlab.winehq.org/wine/wine/-/commit/0e44c658b6d1e3ad87f0fe58e75910a... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Oct 13 12:42:19 2023 +0200 advapi32/tests: Don't check the content of the buffer if ReadEventLog() fails. --- dlls/advapi32/tests/eventlog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 7bd0c5a7cd2..ee24771edcb 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -996,7 +996,11 @@ static void test_readwrite(void) ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, needed, &read, &needed); ok(ret, "Expected success: %ld\n", GetLastError()); - + if (!ret) + { + winetest_pop_context(); + break; + } record = (EVENTLOGRECORD *)buf; ok(record->Length == read,
participants (1)
-
Alexandre Julliard