summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.cpp
diff options
context:
space:
mode:
authorKingCol13 <48412633+KingCol13@users.noreply.github.com>2021-07-09 19:45:53 +0200
committerGitHub <noreply@github.com>2021-07-09 19:45:53 +0200
commit68776c4d5919638b3cecccd083155cd58ccac573 (patch)
tree8b1d508953c3f3f260ad1b33c40e7ef9674ff0d0 /src/Blocks/BlockHandler.cpp
parentProtoProxy: encrypt in-place (diff)
downloadcuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.gz
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.bz2
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.lz
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.xz
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.tar.zst
cuberite-68776c4d5919638b3cecccd083155cd58ccac573.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 819289e14..2ce7904ab 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -618,7 +618,7 @@ unsigned char cBlockHandler::ToolFortuneLevel(const cItem * a_Tool)
char cBlockHandler::FortuneDiscreteRandom(char a_MinDrop, char a_DefaultMax, unsigned char a_BonusMax, char a_DropCap)
{
// First sample the discrete random distribution.
- char DropNum = GetRandomProvider().RandInt<char>(a_MinDrop, a_DefaultMax + a_BonusMax);
+ char DropNum = GetRandomProvider().RandInt<char>(a_MinDrop, static_cast<char>(a_DefaultMax + a_BonusMax));
// Then clamp to within range (clamp instead of min incase of overflow):
return std::clamp<char>(DropNum, a_MinDrop, a_DropCap);