From d245835d63d6dcdeb76ec54ad75ec943545c11d5 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Mon, 28 Oct 2024 22:55:52 +0100 Subject: [PATCH] ci-debug --- cpp/include/kvikio/shim/libcurl.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpp/include/kvikio/shim/libcurl.hpp b/cpp/include/kvikio/shim/libcurl.hpp index 635ea4c7fd..179cd4c4f5 100644 --- a/cpp/include/kvikio/shim/libcurl.hpp +++ b/cpp/include/kvikio/shim/libcurl.hpp @@ -163,8 +163,15 @@ class CurlHandle { _source_line(std::move(source_line)) { // Removing all '\0' characters + auto _source_file_size = _source_file.size(); _source_file.erase(std::remove(_source_file.begin(), _source_file.end(), '\0'), _source_file.end()); + if (_source_file_size != _source_file.size()) { + std::stringstream ss; + ss << "CurlHandle - `source_file` contains " << _source_file_size - _source_file.size() + << " '\\0' chars?!?"; + throw std::runtime_error(ss.str()); + } // Need CURLOPT_NOSIGNAL to support threading, see //