Skip to content

Commit

Permalink
strip '\0' from __FILE__
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Oct 28, 2024
1 parent f43c24d commit 23dc762
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/include/kvikio/shim/libcurl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"cannot include the remote IO API, please build KvikIO with libcurl (-DKvikIO_REMOTE_SUPPORT=ON)"
#endif

#include <algorithm>
#include <cstring>
#include <functional>
#include <memory>
Expand Down Expand Up @@ -161,6 +162,10 @@ class CurlHandle {
_source_file(std::move(source_file)),
_source_line(std::move(source_line))
{
// Removing all '\0' characters
_source_file.erase(std::remove(_source_file.begin(), _source_file.end(), '\0'),
_source_file.end());

// Need CURLOPT_NOSIGNAL to support threading, see
// <https://curl.se/libcurl/c/CURLOPT_NOSIGNAL.html>
setopt(CURLOPT_NOSIGNAL, 1L);
Expand Down

0 comments on commit 23dc762

Please sign in to comment.