From c4557c2b26aea43030d03b324f0c6130cd10fe47 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Sat, 14 Jan 2023 13:16:31 -0500 Subject: [PATCH] Fix bug in CompassFile where m_nHits is uninitialized for CoMPASS empty (2byte) files --- src/evb/CompassFile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp index 80b1d9e..08cb2d2 100644 --- a/src/evb/CompassFile.cpp +++ b/src/evb/CompassFile.cpp @@ -42,6 +42,7 @@ namespace EventBuilder { m_eofFlag = false; m_hitUsedFlag = true; m_filename = filename; + m_nHits = 0; m_file->open(m_filename, std::ios::binary | std::ios::in); m_file->seekg(0, std::ios_base::end); m_size = m_file->tellg();