From fb162084f59ff41aceefc8e59c41e31a328e6476 Mon Sep 17 00:00:00 2001 From: Chris Spiegel Date: Wed, 5 Nov 2025 06:12:41 -0800 Subject: [PATCH] Fix assignment vs comparison typo At the same time, ensure a newline is written after the error message. --- one.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/one.cpp b/one.cpp index 8c67a3af2..ebd2d9ae3 100644 --- a/one.cpp +++ b/one.cpp @@ -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);