mirror of
https://github.com/arun11299/cpp-subprocess.git
synced 2025-08-05 12:56:23 -04:00
string comparison issue on win32 #55
This commit is contained in:
parent
9c624ce4e3
commit
dafa7dd36b
@ -236,10 +236,14 @@ namespace util
|
||||
FILE *file_from_handle(HANDLE h, const char *mode)
|
||||
{
|
||||
int md;
|
||||
if (mode == "w") {
|
||||
if (!mode) {
|
||||
throw OSError("invalid_mode", 0);
|
||||
}
|
||||
|
||||
if (mode[0] == 'w') {
|
||||
md = _O_WRONLY;
|
||||
}
|
||||
else if (mode == "r") {
|
||||
else if (mode[0] == 'r') {
|
||||
md = _O_RDONLY;
|
||||
}
|
||||
else {
|
||||
|
BIN
test/test_split
BIN
test/test_split
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user