From d683501e89c17b4c6613b5268dc5e3111bd8a20d Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 16 Sep 2020 02:42:13 +0000 Subject: Fix -randomseed git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3961 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 4 ++++ editor/pammixmulti.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/HISTORY b/doc/HISTORY index eabfe474..a54f0008 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -44,6 +44,10 @@ not yet BJH Release 10.92.00 PAM input. Always broken. -changemaxval was new in Netpbm 10.65 (December 2013). + pammixmulti: Fix bug: -randomseed ignored on some systems. + Always broken. (pammixmulti was new in Netpbm 10.85 (December + 2018). + pcdovtoppm: Fix some garbage from the conversion from csh to sh in Netpbm 9.12 (March 2001) in conversion from csh arrays that should have stopped it from working at all, despite reports from diff --git a/editor/pammixmulti.c b/editor/pammixmulti.c index d063d96c..f5012d7a 100644 --- a/editor/pammixmulti.c +++ b/editor/pammixmulti.c @@ -243,7 +243,7 @@ blendTuplesRandom(struct ProgramState * const stateP, from a random input image. -----------------------------------------------------------------------------*/ unsigned int const depth = stateP->inPam[0].depth; - unsigned int const img = (unsigned int) (random() % stateP->inFileCt); + unsigned int const img = (unsigned int) (rand() % stateP->inFileCt); unsigned int samp; -- cgit 1.4.1