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 359291 - crash when localized decimal point is greater than 1 char
crash when localized decimal point is greater than 1 char
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.8.x
Other Solaris
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2006-10-03 14:15 UTC by Matt Keenan (IRC:MattMan)
Modified: 2006-10-03 16:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch (365 bytes, patch)
2006-10-03 14:16 UTC, Matt Keenan (IRC:MattMan)
none Details | Review

Description Matt Keenan (IRC:MattMan) 2006-10-03 14:15:01 UTC
Gcalctool crashs when run in arabic locale.


Cause:
In function display.c :  MPstr_to_num() :

The return value from get_localized_numeric_point() is asserted, which is
correct, however the length of the returned decimal point is checked to 
ensure it is one char in length, this is not correct as in some utf locales
the decimal char is greater than 1 char, e.g. arabic, which is 2 chars.

So simply removing the check for 1 char fixes the issue.
Comment 1 Matt Keenan (IRC:MattMan) 2006-10-03 14:16:24 UTC
Created attachment 73949 [details] [review]
Patch

Patch which removes the strlen() check for the localized decimal point.
Comment 2 Rich Burridge 2006-10-03 16:17:09 UTC
Thanks Matt. I've removed the bogus assert.
Change checked into CVS. I've bumped the version
number in configure.in to 5.9.3. Fix will turn up
in the first gcalctool tarball for GNOME 2.17.1
in a couple weeks time.