fixed exploding dice bug

This commit is contained in:
Lilith Schier 2026-08-20 01:30:31 +02:00
parent 9b78cf2786
commit 9dd6bee0e3

View file

@ -122,9 +122,6 @@ impl Expression {
// Exploding dice are early, they add rolls
if let Some(fragments) = x {
write!(w, "x")?;
if size < 2 {
bail!("Infinite explosion.")
}
let mut comparers = Vec::with_capacity(fragments.len());
for fragment in fragments {
comparers.push(fragment.comparer(rng, w)?);
@ -301,7 +298,7 @@ impl Expression {
} else {
1
};
if count > 1_000_000 {
if count > DICE_POOL_LIMIT {
bail!("Too many dice.")
};
let size = size.avg()? as i64;