From: Peter van Dijk Date: Wed, 5 Jan 2022 19:04:13 +0000 (+0100) Subject: pdnsutil edit-zone: fix n and e behaviour on increase-serial prompt, fixes #11142 X-Git-Tag: auth-4.7.0-alpha1~92^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11144%2Fhead;p=thirdparty%2Fpdns.git pdnsutil edit-zone: fix n and e behaviour on increase-serial prompt, fixes #11142 --- 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; } } }