Comment 14 for bug 521038

Revision history for this message
Ondřej Surý (ondrej) wrote :

I have traced it down to display_insert(), so after all it is locale related, see attached patch:

diff -urNap gcalctool-5.29.90~/src/display.c gcalctool-5.29.90/src/display.c
--- gcalctool-5.29.90~/src/display.c 2010-02-09 06:14:11.000000000 +0100
+++ gcalctool-5.29.90/src/display.c 2010-02-19 11:46:38.342465011 +0100
@@ -445,7 +445,7 @@ display_insert(GCDisplay *display, int c
                 use = FALSE;

             /* Ignore thousands separators */
- if (strncmp(c, v->tsep, strlen(v->tsep)) == 0)
+ if (*(v->tsep) && strncmp(c, v->tsep, strlen(v->tsep)) == 0)
                 use = FALSE;

             /* Copy existing text */