Bug 498233

Summary: In hexadecimal mode, storing a result in memory and then recalling causes its decimal representation to be used as if it were a hexadecimal number
Product: [Applications] kcalc Reporter: Heinrich Schuchardt <xypron.glpk>
Component: generalAssignee: Gabriel Barrantes <gabriel.barrantes.dev>
Status: CONFIRMED ---    
Severity: normal CC: gabriel.barrantes.dev, john.kizer, xypron.glpk
Priority: NOR    
Version First Reported In: 24.12.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Heinrich Schuchardt 2025-01-03 22:24:37 UTC
SUMMARY

When storing a hexadecimal number and reloading it the value is incorrect.

STEPS TO REPRODUCE

1. Enter hexadecimal mode

2. Follow these steps

=========== =================
Entry       Display
=========== =================
<AC>        0
1010101     1010101
<MS>        M =0x1010101
ffffffff    FFFFFFFF
-           FFFFFFFF-
<MR>        FFFFFFFF-16843009
=           E97BCFF6
=========== =================

OBSERVED RESULT

The decimal representation of the saved number is used as string entry for a hexadecimal calculation.

EXPECTED RESULT

In hexadecimal mode the saved value is correctly loaded as hexadecimal number.

SOFTWARE/OS VERSIONS

KCalc: 24.12.0
KDE Frameworks: 6.9.0
Qt: Using 6.8.1 and built against 6.8.1
Ubuntu Plucky Puffin (development branch) (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.11.0-9-generic

ADDITIONAL INFORMATION

Kcalc 21.12.3 worked just fine.
Comment 1 John Kizer 2025-01-12 04:30:51 UTC
Hi - thanks for the bug report! I can reproduce this on Fedora KDE 41 with the RPM version of KCalc 24.12.0.