From: Mark Wooding Date: Sun, 4 May 2014 10:33:31 +0000 (+0100) Subject: Makefile: Fix signature corruption: awk indexes strings from 1. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/dnserr/commitdiff_plain/f73a26186c15d2fd4b83c822f77a411cd7241ea5?ds=inline Makefile: Fix signature corruption: awk indexes strings from 1. Silly people. --- diff --git a/Makefile b/Makefile index 7a397d1..a9f5e61 100644 --- 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