aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-07-01 22:01:48 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-07-01 22:01:48 +1200
commit59dba36a9a91d17684e7ea31925a93d465c9d314 (patch)
treea8d99a4d8762a05fd35ee2e026afa4de137fca72 /games
parentReimplement rndl(1df) in Awk (diff)
downloaddotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.tar.gz
dotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.zip
Correct srand() arg count
Diffstat (limited to 'games')
-rw-r--r--games/pks.awk5
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