From fef0fbfc86aaeee03acf62c9d13af70f373679eb Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Wed, 5 Jan 2022 20:04:13 +0100 Subject: [PATCH] pdnsutil edit-zone: fix n and e behaviour on increase-serial prompt, fixes #11142 --- pdns/pdnsutil.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 4792fae681..562780989f 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1187,6 +1187,7 @@ static int editZone(const DNSName &zone) { tmpfd=-1; } editMore:; + post.clear(); cmdline=editor+" "; if(gotoline > 0) cmdline+="+"+std::to_string(gotoline)+" "; @@ -1297,17 +1298,15 @@ static int editZone(const DNSName &zone) { changed[{dr.d_name, dr.d_type}]+=str.str(); grouped[{dr.d_name, dr.d_type}].at(0) = dr; } - break; + break; case 'q': return EXIT_FAILURE; - break; case 'e': - goto editAgain; - break; + goto editMore; case 'n': + goto reAsk2; default: goto reAsk3; - break; } } } -- 2.47.2