Skip to content

Instantly share code, notes, and snippets.

@historicbruno
historicbruno / gist:8a2b790a381a16c795e1
Created September 4, 2014 18:26
CheckEventLog: incorrect error handling for failed EvtQuery
diff --git a/modules/CheckEventLog/CheckEventLog.cpp b/modules/CheckEventLog/CheckEventLog.cpp
index 900361d..e2d764e 100644
--- a/modules/CheckEventLog/CheckEventLog.cpp
+++ b/modules/CheckEventLog/CheckEventLog.cpp
@@ -262,15 +262,15 @@ void check_modern(const std::string &logfile, const std::string &scan_range, con
}
eventlog::evt_handle hResults = eventlog::EvtQuery(NULL, utf8::cvt<std::wstring>(logfile).c_str(), pwsQuery, flags);
if (!hResults)
- throw nscp_exception("Failed to open channel: " + error::lookup::last_error(status));
- status = GetLastError();
@historicbruno
historicbruno / gist:6945237
Created October 12, 2013 02:56
Assertion failure after lobby disconnect
Assertion failed: "selected >= 0 && selected+1 < (int)m_ItemsYPositions.size()"
Location: COList.cpp:236 (COList::DrawList)
Call stack: