Skip to content

Commit 2678d90

Browse files
committed
Fixed GetLastError() static casting.
1 parent 3da3fb0 commit 2678d90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/myshell.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void MyShell::createWindowsProcess(const std::string& command) {
9393
!CreatePipe(&this->outputReadHandle, &outputWrite, &saAttr, 0) ||
9494
!CreatePipe(&this->errorReadHandle, &errorWrite, &saAttr, 0))
9595
throw std::system_error(
96-
GetLastError(),
96+
static_cast<int>(GetLastError()),
9797
std::system_category(),
9898
"Failed to create pipes"
9999
);
@@ -120,7 +120,7 @@ void MyShell::createWindowsProcess(const std::string& command) {
120120
NULL, NULL,
121121
&siStartInfo, &piProcInfo
122122
)) throw std::system_error(
123-
GetLastError(),
123+
static_cast<int>(GetLastError()),
124124
std::system_category(),
125125
"Failed to create process"
126126
);
@@ -304,7 +304,7 @@ void MyShell::writeToShell(std::string input) {
304304
&bytesWritten,
305305
NULL
306306
)) throw std::system_error(
307-
GetLastError(),
307+
static_cast<int>(GetLastError()),
308308
std::system_category(),
309309
"Failed to write to process"
310310
);

0 commit comments

Comments
 (0)