Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 22, 2013 11:46
Show Gist options
  • Save Habbie/5434133 to your computer and use it in GitHub Desktop.
Save Habbie/5434133 to your computer and use it in GitHub Desktop.
patch that check comment only for the first character
--- pdns-2.9.20/pdns/backends/bind/zoneparser2.cc.old 2006-03-15 19:29:38.000000000 +0100
+++ pdns-2.9.20/pdns/backends/bind/zoneparser2.cc 2006-11-13 20:23:40.563902162 +0100
@@ -75,7 +75,8 @@ void ZoneParser::parse(const string &fna
while(gzgets(fds.top(), cline,sizeof(cline)-1)) {
line=cline;
chomp(line," \x1a\r\n");
- cutOff(line,";");
+ if (line[0] == ';')
+ cutOff(line,";");
d_lineno++;
if(line.empty())
@@ -135,7 +136,8 @@ void ZoneParser::parse(const string &fna
while(gzgets(fds.top(),cline, sizeof(cline)-1)) {
line=cline;
chomp(line," \x1a\r\n");
- cutOff(line,";");
+ if (line[0] == ';')
+ cutOff(line,";");
d_lineno++;
if(line.empty())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment