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

This commit is contained in:
Looly
2025-05-23 21:41:18 +08:00
parent 95ee9a0cb5
commit 5f5ead1129
2 changed files with 2 additions and 1 deletions

View File

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