diff options
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index b5967ff4dc11..380064bb0da8 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3446,7 +3446,7 @@ RTLFUNC(Rnd) else { double nRand = (double)rand(); - nRand = ( nRand / (double)RAND_MAX ); + nRand = ( nRand / ((double)RAND_MAX + 1.0)); rPar.Get(0)->PutDouble( nRand ); } } |