]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil edit-zone: fix n and e behaviour on increase-serial prompt, fixes #11142 11144/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 5 Jan 2022 19:04:13 +0000 (20:04 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 5 Jan 2022 19:21:00 +0000 (20:21 +0100)
pdns/pdnsutil.cc

index 4792fae681cdcd8bf20d4f3c4513f0bfb43c7c26..562780989f45798e2dfba1e4cbcf7439d5e15df4 100644 (file)
@@ -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;
       }
     }
   }