diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-12 14:17:53 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-12 14:17:53 +1200 |
commit | 00d01925da084bc7c5be00ed4e66e4aadacd2e26 (patch) | |
tree | c9eb68468e81567316afddd9b4f7cc5396f2ee4d /games/squ.awk | |
parent | Add missing word to acq(6df) (diff) | |
download | dotfiles-00d01925da084bc7c5be00ed4e66e4aadacd2e26.tar.gz dotfiles-00d01925da084bc7c5be00ed4e66e4aadacd2e26.zip |
Adjust newline test in squ(6df) for correct type
Moving the '+' operator to apply to "k" rather than to "len" correctly
coerces an integer type for the '<' test rather than a lexical
comparison. This was failing on words longer than 10 letters.
Diffstat (limited to 'games/squ.awk')
-rw-r--r-- | games/squ.awk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/games/squ.awk b/games/squ.awk index 3cf3f57a..85b0bf09 100644 --- a/games/squ.awk +++ b/games/squ.awk @@ -6,5 +6,5 @@ let[i - 1] = substr(str, i, 1) for (j in let) for (k in let) - printf (k < len - 1) ? "%s " : "%s\n", let[(k + j) % len] + printf (k + 1 < len) ? "%s " : "%s\n", let[(k + j) % len] } |