Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 30: [PATCH 30/68] fix(release): close local gate findings

src/streams.cpp

Before: src/streams.cpp · After: src/streams.cpp

File metadata
index 0364c2134f4bf799f000c64c602edb5a20fa97e4..c263b0db24b4ab14b081eb0c851901fe100bd8d8 100644

Download original patch · Release notes

Diff rows 1–7 of 7. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/streams.cpp CHANGED
@@ -81,6 +81,7 @@ void AutoFile::ignore(size_t nSize)
81
81
  void AutoFile::write(std::span<const std::byte> src)
82
82
  {
83
83
  if (!m_file) throw std::ios_base::failure("AutoFile::write: file handle is nullptr");
84
+ if (src.empty()) return;
84
85
  if (!m_obfuscation) {
85
86
  if (std::fwrite(src.data(), 1, src.size(), m_file) != src.size()) {
86
87
  throw std::ios_base::failure("AutoFile::write: write failed");