Fix BCD decoding bug

This commit is contained in:
Stefan Wahren 2013-11-07 00:13:56 +01:00
parent e9d39d4708
commit d79cb1c998

View File

@ -2380,8 +2380,8 @@ mbus_data_record_decode(mbus_data_record *record)
case 0x0E: // 12 digit BCD (48 bit)
float_val = mbus_data_bcd_decode(record->data, 6);
snprintf(buff, sizeof(buff), "%lld", float_val);
long_long_val = mbus_data_bcd_decode(record->data, 6);
snprintf(buff, sizeof(buff), "%lld", long_long_val);
if (debug)
printf("%s: DIF 0x%.2x was decoded using 12 digit BCD\n", __PRETTY_FUNCTION__, record->drh.dib.dif);