summaryrefslogtreecommitdiff
path: root/easytool/easycard.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-08-17 10:02:51 +0800
committerHarald Welte <laforge@gnumonks.org>2010-08-17 10:02:51 +0800
commite268c5b72e40da936cdea7cb846adde6ceca522e (patch)
treeb2ce7c08994ae3cbd1487d2fccabf552793b4512 /easytool/easycard.c
parentaa0de9c6ae42de1e8528f73af9d99568e7a6aef0 (diff)
easytool: fix calculation of 'remaining' when modifying log record
Diffstat (limited to 'easytool/easycard.c')
-rw-r--r--easytool/easycard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/easytool/easycard.c b/easytool/easycard.c
index 980735d..a98c280 100644
--- a/easytool/easycard.c
+++ b/easytool/easycard.c
@@ -52,7 +52,7 @@ time_t easy_timestamp2time(const uint8_t *easy_ts)
int easy_update_log_rec(struct easy_log_rec *elr, int16_t delta)
{
int32_t sum = elr->amount + delta;
- int32_t remaining = elr->remaining = delta;
+ int32_t remaining = elr->remaining + delta;
if ((sum < 0 || sum > 0xffff) ||
(remaining < 0 || remaining > 0xffff))
personal git repositories of Harald Welte. Your mileage may vary