diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-01 22:01:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-01 22:01:48 +1200 |
commit | 59dba36a9a91d17684e7ea31925a93d465c9d314 (patch) | |
tree | a8d99a4d8762a05fd35ee2e026afa4de137fca72 /games/pks.awk | |
parent | Reimplement rndl(1df) in Awk (diff) | |
download | dotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.tar.gz dotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.zip |
Correct srand() arg count
Diffstat (limited to 'games/pks.awk')
-rw-r--r-- | games/pks.awk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/games/pks.awk b/games/pks.awk index c7ff320d..1e69f4ee 100644 --- a/games/pks.awk +++ b/games/pks.awk @@ -14,7 +14,10 @@ BEGIN { # Seed the random number generator "rnds 2>/dev/null" | getline seed - srand(seed) + if (length(seed)) + srand(seed) + else + srand() } # Iterate over the lines, randomly assigning the first field of each one with a |