From 2c35167d9be73d61c3d40c19f62f57baed87c836 Mon Sep 17 00:00:00 2001 From: Klemens Morgenstern Date: Tue, 30 Aug 2022 17:12:14 +0800 Subject: [PATCH] Closes #266 --- include/boost/process/detail/posix/executor.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/process/detail/posix/executor.hpp b/include/boost/process/detail/posix/executor.hpp index 48e69cc9..316d2120 100644 --- a/include/boost/process/detail/posix/executor.hpp +++ b/include/boost/process/detail/posix/executor.hpp @@ -155,8 +155,8 @@ class executor void write_error(const std::error_code & ec, const char * msg) { //I am the child - const auto len = std::strlen(msg); - int data[2] = {ec.value(), static_cast(len + 1)}; + const auto len = static_cast(std::strlen(msg)); + int data[2] = {ec.value(), len + 1}; boost::ignore_unused(::write(_pipe_sink, &data[0], sizeof(int) * 2)); boost::ignore_unused(::write(_pipe_sink, msg, len));