From e268c5b72e40da936cdea7cb846adde6ceca522e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 17 Aug 2010 10:02:51 +0800 Subject: easytool: fix calculation of 'remaining' when modifying log record --- easytool/easycard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'easytool/easycard.c') 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)) -- cgit v1.2.3