Merge pull request #10 from zerotier/windows-bool-assign

Fix assignment vs comparison typo
This commit is contained in:
Joseph Henry 2025-11-10 09:46:58 -08:00 committed by GitHub
commit 8e5d81728f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1278,9 +1278,9 @@ static int cli(int argc, char** argv)
return 0;
}
BOOL err = WriteFile(file, dump.str().c_str(), dump.str().size(), NULL, NULL);
if (err = FALSE) {
fprintf(stderr, "Error writing file");
BOOL ok = WriteFile(file, dump.str().c_str(), dump.str().size(), NULL, NULL);
if (ok == FALSE) {
fprintf(stderr, "Error writing file\n");
return 1;
}
CloseHandle(file);