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 439985 - Negative value not saved in memory register across invocations
Negative value not saved in memory register across invocations
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.8.x
Other Linux
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2007-05-20 17:35 UTC by Sven Arvidsson
Modified: 2007-05-21 18:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Patch to hopefully fix the problem. (1.47 KB, patch)
2007-05-21 18:06 UTC, Rich Burridge
committed Details | Review

Description Sven Arvidsson 2007-05-20 17:35:31 UTC
[ Forwarded from http://bugs.debian.org/423946 ]

It appears that any negative value saved in the memory register does not persist across invocations.
Comment 1 Rich Burridge 2007-05-20 18:09:46 UTC
Confirmed. The negative value is getting saved in the
gcalctool gconf setting (register<n>) correctly -- confirmed
with gconf-editor -- it's just not getting read back in
properly, the next time that gcalctool starts up.

I'll look into it more deeply tomorrow.

Thanks.
Comment 2 Rich Burridge 2007-05-20 18:47:17 UTC
The problem is in MPstr_to_num() in display.c. Looks like there
needs to be a check on whether the first character in the string
is "-", and if it is the number needs to be negated with mpneg().

Hopefully a patch tomorrow.
Comment 3 Rich Burridge 2007-05-21 18:06:04 UTC
Created attachment 88559 [details] [review]
Patch to hopefully fix the problem.

Patch committed to SVN trunk/HEAD.
This was also a problem was negative constants.
Fix will also appear in the next gcalctool tarball release (5.19.3).