Ignore LPT parallel devices on Windows

This commit is contained in:
Will Hedgecock 2022-01-21 12:09:25 -06:00
parent d0aab972b6
commit 22576d7365
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ JNIEXPORT jobjectArray JNICALL Java_com_fazecast_jSerialComm_SerialPort_getCommP
comPortString = (comPort[0] == L'\\') ? (wcsrchr(comPort, L'\\') + 1) : comPort;
if (key != INVALID_HANDLE_VALUE)
RegCloseKey(key);
if (!comPortString)
if (!comPortString || wcsstr(comPortString, L"LPT"))
continue;
// Fetch the friendly name for this device