fix modeswitch EOL parsing

This commit is contained in:
CrazyRedMachine
2020-07-26 12:08:25 +02:00
parent 81a459d3cf
commit 0dad13c220
3 changed files with 2 additions and 1 deletions
+1
View File
@@ -29,6 +29,7 @@ int main(int argc, char* argv[])
file = fopen("devicepath.dat", "r");
while ( fgets(path,256,file) != NULL )
{
path[strcspn(path, "\r\n")] = 0;
hidHandle = CreateFile(path, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if ( hidHandle != INVALID_HANDLE_VALUE )
break;