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 7a397d16e64d4e05fca18f660b28e6e6eb2f5a34..a9f5e61fe6782f5a8d45e028cdcb970515b969d8 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