chiark / gitweb /
Makefile: Fix signature corruption: awk indexes strings from 1.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 May 2014 10:33:31 +0000 (11:33 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 4 May 2014 10:33:31 +0000 (11:33 +0100)
Silly people.

Makefile

index 7a397d1..a9f5e61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,12 +70,12 @@ dnserr.zone.sig: dnserr.zone.sigold dnserr.zone.signew
             } \
             $(BADSIGMATCH) { \
                s = $$13; \
-               for (i = length(s)/2; i >= 0; i--) { \
+               for (i = length(s)/2; i > 0; i--) { \
                  c = substr(s, i, 1); \
                  if (c != tolower(c)) { c = tolower(c); break; } \
                  else if (c != toupper(c)) { c = toupper(c); break; } \
                } \
-               $$13 = substr(s, 0, i) c substr(s, i + 1); \
+               $$13 = substr(s, 1, i) c substr(s, i + 2); \
             } \
             { print; }' \
                dnserr.zone.signew >$@.new