Account: count coins from 1..X

This commit is contained in:
Siegfried Siegert 2023-11-29 12:31:05 +01:00
parent 350c2351b1
commit 07d812f5d9
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -340,7 +340,7 @@ void ATBDeviceControllerPlugin::private_getAccountData()
accountData.insert("accountStartTime", startDateTime);
//-------------------------------------------------------------------------
// COINS in Vault: --------------------------------------------------------
int numberOfCoinVariants = sizeof(retVR.coinsInVault);
@ -351,7 +351,7 @@ void ATBDeviceControllerPlugin::private_getAccountData()
if (numberOfCoinVariants > 16) { numberOfCoinVariants = 16; }
accountData.insert("NumberOfCoinVariants", numberOfCoinVariants);
for (int i = 0; i < numberOfCoinVariants; ++i) {
for (int i = 1; i <= numberOfCoinVariants; ++i) {
accountData.insert("COIN_" + QString::number(i) + "_Quantity", retVR.coinsInVault[i]);
accountData.insert("COIN_" + QString::number(i) + "_Value", retVR.coinDenomination[i]);