After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728933 - Switching base during calculation returns malformed expression
Switching base during calculation returns malformed expression
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
3.12.x
Other Linux
: Normal major
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-25 07:22 UTC by uffe
Modified: 2014-06-10 20:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description uffe 2014-04-25 07:22:18 UTC
Switching base during calculation returns malformed expression

When switching base eg dec to hex or opposite during calculation it is impossible to use the converted result in further calculations with the new base - malformed expression error is returned
Comment 1 PioneerAxon 2014-04-25 07:25:20 UTC
Hi there,

Can you provide an example to reproduce the bug? And the exact version of Calculator you're using?

Thank you.. :)
Comment 2 uffe 2014-04-25 07:34:00 UTC
Using gnome-calculator 3.12.1 on ArchLinux

Start calculator

switch to decimal base

type in: 4+7 <enter>

result shown: 11 

switch to hex base

result shown: B

type in: + 3 (in addition to the existing shown 'B'

press enter

malformed expression is shown
Comment 3 PioneerAxon 2014-06-10 18:22:51 UTC
Additional note.

I have pinned down the problem origin, but was unable to fix the issue. The problem is the iterators of tagged substring are getting reassigned to invalid indexes after call to TextBuffer.insert_with_tags (); from method reformat_ans (); in math-equation.vala.
Comment 4 PioneerAxon 2014-06-10 20:34:07 UTC
Thank you for the bug report.

The issue has been fixed, and will be available with next release of calculator. :)

Reference commit : https://git.gnome.org/browse/gnome-calculator/commit/?id=9ff8396ca73eaade391acc9eceacc1fcfe774cfc