summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 54226dd078..b7618021da 100644
--- a/pp.c
+++ b/pp.c
@@ -2832,7 +2832,7 @@ PP(pp_rand)
PP(pp_srand)
{
dVAR; dSP; dTARGET;
- const UV anum = (MAXARG < 1) ? seed() : POPu;
+ const UV anum = (MAXARG < 1 || (!TOPs && !POPs)) ? seed() : POPu;
(void)seedDrand01((Rand_seed_t)anum);
PL_srand_called = TRUE;
if (anum)