From c6d29a16896ef19ba2adcc646329258f5d5fb5e5 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Wed, 21 Aug 2024 23:26:51 +0100 Subject: [PATCH] Move debug command line line after opening the log file --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index e407883fd..b4045bf80 100644 --- a/src/main.c +++ b/src/main.c @@ -928,10 +928,6 @@ int main(int argc, char *argv[]) { } } - msg_debug("$ "); // Record command line when debugging - for(int i = 0; i < argc; i++) - msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' '); - if(logfile != NULL) { FILE *newstderr = freopen(logfile, "w", stderr); @@ -942,6 +938,10 @@ int main(int argc, char *argv[]) { } } + msg_debug("$ "); // Record command line + for(int i = 0; i < argc; i++) + msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' '); + size_t ztest; if(1 != sscanf("42", "%zi", &ztest) || ztest != 42)