diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-08-17 10:02:51 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-08-17 10:02:51 +0800 |
commit | e268c5b72e40da936cdea7cb846adde6ceca522e (patch) | |
tree | b2ce7c08994ae3cbd1487d2fccabf552793b4512 /easytool/easycard.c | |
parent | aa0de9c6ae42de1e8528f73af9d99568e7a6aef0 (diff) |
easytool: fix calculation of 'remaining' when modifying log record
Diffstat (limited to 'easytool/easycard.c')
-rw-r--r-- | easytool/easycard.c | 2 |
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)) |