X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fwindows%2Fserial.cpp;fp=source%2Fio%2Fwindows%2Fserial.cpp;h=bd086dd4d88e0985d6ab292f0bebeed92f5453f2;hp=84a3175f875c4b0b774f1b5e1c1004db1d6bd351;hb=41363aed34382386f915f17c1a961750b4fdcb14;hpb=26a5878092f6547e701fd1a33abbf1878d26ab70 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;