Skip to content

Commit 5b75acd

Browse files
committed
Fix possible loss of data compile warning
1 parent 4b89ec2 commit 5b75acd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/piped_process.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ piped_processt::send_responset piped_processt::send(const std::string &message)
346346
return send_responset::ERRORED;
347347
}
348348
#ifdef _WIN32
349-
if(!WriteFile(child_std_IN_Wr, message.c_str(), message.size(), NULL, NULL))
349+
const auto message_size = narrow<DWORD>(message.size());
350+
if(!WriteFile(child_std_IN_Wr, message.c_str(), message_size, NULL, NULL))
350351
{
351352
// Error handling with GetLastError ?
352353
return send_responset::FAILED;

0 commit comments

Comments
 (0)