From 9890cf25b47fa88a7edfb1b137ad162035ac6665 Mon Sep 17 00:00:00 2001 From: SnDream Date: Sat, 9 Mar 2024 21:11:56 +0800 Subject: [PATCH] Fix `-O` being always ignored (#1339) The file isn't opened at this point, it's the file name that should be inspected. --- src/link/output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/link/output.cpp b/src/link/output.cpp index 345c2c75..ef253d10 100644 --- a/src/link/output.cpp +++ b/src/link/output.cpp @@ -202,7 +202,7 @@ static void writeROM() { err("Failed to open output file \"%s\"", outputFileName); } - if (overlayFile) { + if (overlayFileName) { if (strcmp(overlayFileName, "-")) { overlayFile = fopen(overlayFileName, "rb"); } else {