From 857fa0be76249b2004d690503fb968a363a7513b Mon Sep 17 00:00:00 2001 From: Ethan Slattery Date: Sat, 11 May 2019 11:25:04 -0700 Subject: [PATCH] changes for MSVC --- c/common/i2cdriver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/common/i2cdriver.c b/c/common/i2cdriver.c index f110303..181587a 100644 --- a/c/common/i2cdriver.c +++ b/c/common/i2cdriver.c @@ -5,8 +5,8 @@ #include #if !defined(WIN32) #include -#endif #include +#endif #include #define __STDC_FORMAT_MACROS #include @@ -55,7 +55,7 @@ HANDLE openSerialPort(const char *portname) if (portname[0] == 'C') fmt = "\\\\.\\%s"; else - fmt == "%s"; + fmt = "%s"; snprintf(fullname, sizeof(fullname), fmt, portname); DWORD accessdirection = GENERIC_READ | GENERIC_WRITE; HANDLE hSerial = CreateFile((LPCSTR)fullname,