修复Money中金额分配的问题bug(issue#IC9Y35@Gitee)

This commit is contained in:
Looly
2025-05-23 21:41:24 +08:00
parent e019d98e3e
commit 115b4b91c4

View File

@@ -742,7 +742,7 @@ public class Money implements Serializable, Comparable<Money> {
final Money lowResult = newMoneyWithSameCurrency(cent / targets);
final Money highResult = newMoneyWithSameCurrency(lowResult.cent + 1);
final int remainder = (int) cent % targets;
final int remainder = (int) (cent % targets);
for (int i = 0; i < remainder; i++) {
results[i] = highResult;