diff options
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 0260e14da7..be56d1e2d2 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -3091,11 +3091,11 @@ void CaptureMessage(const CAddress& addr, const std::string& msg_type, const Spa CAutoFile f(fsbridge::fopen(path, "ab"), SER_DISK, CLIENT_VERSION); ser_writedata64(f, now.count()); - f.write(msg_type.data(), msg_type.length()); + f.write(MakeByteSpan(msg_type)); for (auto i = msg_type.length(); i < CMessageHeader::COMMAND_SIZE; ++i) { f << uint8_t{'\0'}; } uint32_t size = data.size(); ser_writedata32(f, size); - f.write((const char*)data.data(), data.size()); + f.write(AsBytes(data)); } |