From af6dc595827a76e303f0ca2dde77b65b4a35fffa Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Tue, 11 Jul 2023 23:14:44 +0100 Subject: [PATCH] Fix -n warning for first interactive terminal --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index dfc33946..fe27af75 100644 --- a/src/main.c +++ b/src/main.c @@ -1499,7 +1499,7 @@ int main(int argc, char * argv []) pgm->flush_cache(pgm, p); wrmem |= upd->op == DEVICE_WRITE; } - if((uflags & UF_NOWRITE) && !terminal++ && upd->cmdline) + if((uflags & UF_NOWRITE) && upd->cmdline && !terminal++) pmsg_warning("the terminal ignores option -n, that is, it writes to the device\n"); rc = do_op(pgm, p, upd, uflags); if (rc && rc != LIBAVRDUDE_SOFTFAIL) {