aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2018-09-19 12:18:56 +0000
committerPJ Fanning <fanningpj@apache.org>2018-09-19 12:18:56 +0000
commit5c582c101996ccb26fac6e6a360200dcd6c14c1b (patch)
tree7339f9f8c9bf6531cbfd787136ef23385e45f6d9 /src/java/org/apache/poi/ss
parent6d9dbc7801b8598a464ac2fd22d791b140144ccb (diff)
downloadpoi-5c582c101996ccb26fac6e6a360200dcd6c14c1b.tar.gz
poi-5c582c101996ccb26fac6e6a360200dcd6c14c1b.zip
[bug-62738] make int cast a long cast in randbetween
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1841321 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss')
-rw-r--r--src/java/org/apache/poi/ss/formula/atp/RandBetween.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/ss/formula/atp/RandBetween.java b/src/java/org/apache/poi/ss/formula/atp/RandBetween.java
index 5eac08fe56..79f1c0acea 100644
--- a/src/java/org/apache/poi/ss/formula/atp/RandBetween.java
+++ b/src/java/org/apache/poi/ss/formula/atp/RandBetween.java
@@ -77,7 +77,7 @@ final class RandBetween implements FreeRefFunction{
top = bottom;
}
- return new NumberEval((bottom + (int)(Math.random() * ((top - bottom) + 1))));
+ return new NumberEval((bottom + (long)(Math.random() * ((top - bottom) + 1))));
}