windows: displayed values overflow int32 in 5.6.4

Bug #2022049 reported by Polikutin Evgenii
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

+ INFO :: your Operating System & your HomeBank version

1) HomeBank 5.6.4
2) your OS type: Windows 11

+ WHERE :: provide the WINDOW/DIALOG NAME

All windows I am aware of except "Change transaction"

+ WHAT :: provide the STEP TO REPRODUCE for the bug reviewer

When transaction value (or total for an account, or a total for all accounts) is higher than 21474836.47 the values will overflow and show as -21474836.48.

Steps to reproduce: create an incoming transaction with value greater than 21474836.47 (e.g. 40000000).

The transaction itself seems to be fine, as it displays the original value when opened.

I installed Homebank version 5.6.3 and it displayed the values correctly, so I guess it is a regression in the latest release.

From comparing revisions it seems to me that the problem lies here: https://bazaar.launchpad.net/~mdoyen/homebank/5.6.x/view/head:/src/hb-misc.c#L54
Specifically, the value needs to be cast to long long, not long.

+ HOW :: provide the EXPECTATION, or WHAT SEEMS TO BE WRONG IN CLEAR TERMS

I expect the values to be displayed correctly.

Revision history for this message
Polikutin Evgenii (polikutinevgeny) wrote :
Revision history for this message
Polikutin Evgenii (polikutinevgeny) wrote :
description: updated
description: updated
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

this is because I still compile in 32bits, so long is 4 bytes (int32) => I forced 64bits into the code
=> I will probably compile 64bit as well, as 32bits is deprecated since W10 2004 (may 2020).

for reference:
https://www.bleepingcomputer.com/news/microsoft/rip-microsoft-to-drop-support-for-windows-10-on-32-bit-systems/

Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Low
milestone: none → 5.7
status: New → Fix Committed
Maxime DOYEN (mdoyen)
summary: - Displayed values overflow int32
+ windows: displayed values overflow int32 in 5.6.4
Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: 5.7 → 5.6.5
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.