From 1ad0d42532e4934290bcf251f9e9865cc4519f01 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Sun, 28 May 2023 22:39:33 +0200 Subject: [PATCH] pdnsutil: if user pushes unknown key in response to "problem with zone" prompt, do not throw away their changes --- pdns/pdnsutil.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 18b10c24bf..6e0466a970 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1264,16 +1264,17 @@ static int editZone(const DNSName &zone, const PDNSColors& col) { cerr << col.red() << col.bold() << "There was a problem with your zone" << col.rst() << "\nOptions are: (e)dit your changes, (r)etry with original zone, (a)pply change anyhow, (q)uit: " << std::flush; int c=read1char(); cerr<<"\n"; - if(c!='a') + if(c=='e') { post.clear(); - if(c=='e') goto editMore; - else if(c=='r') + } else if(c=='r') { + post.clear(); goto editAgain; - else if(c=='q') + } else if(c=='q') { return EXIT_FAILURE; - else if(c!='a') + } else if(c!='a') { goto reAsk; + } } -- 2.47.2