X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fwindows%2Fserial.cpp;h=bd086dd4d88e0985d6ab292f0bebeed92f5453f2;hb=4ad05c650c55e3edccea887d15b26f41cdf60fb6;hp=84a3175f875c4b0b774f1b5e1c1004db1d6bd351;hpb=7a493cb73ff5f5f820d4873d6c993d0e9c5a580a;p=libs%2Fcore.git diff --git a/source/io/windows/serial.cpp b/source/io/windows/serial.cpp index 84a3175..bd086dd 100644 --- a/source/io/windows/serial.cpp +++ b/source/io/windows/serial.cpp @@ -13,7 +13,7 @@ void Serial::platform_init(const string &port) { string name = "\\\\.\\"+port; - *handle = CreateFile(name.c_str(), GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0); + *handle = CreateFile(name.c_str(), GENERIC_READ|GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, nullptr); if(!handle) throw system_error(format("CreateFile(%s)", port)); mode = M_READ|M_WRITE;