diff options
author | Tim Janik <timj@gtk.org> | 2000-01-09 10:58:55 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2000-01-09 10:58:55 +0000 |
commit | 0b2c4e4f5ad8fed6a0c60a2a573156caf9260b3a (patch) | |
tree | cfcb88a8bd7b9af9714522f80e5d5389ccde3eca /gstrfuncs.c | |
parent | bc5baaa76d80ae3682d9ce46e6131a6935491015 (diff) | |
download | glib-0b2c4e4f5ad8fed6a0c60a2a573156caf9260b3a.tar.gz |
correctly fetch the current locale, fix from owen.
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
fix from owen.
Diffstat (limited to 'gstrfuncs.c')
-rw-r--r-- | gstrfuncs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gstrfuncs.c b/gstrfuncs.c index 99ce93ac4..e549260d7 100644 --- a/gstrfuncs.c +++ b/gstrfuncs.c @@ -200,9 +200,11 @@ g_strtod (const gchar *nptr, { gchar *old_locale; - old_locale = setlocale (LC_NUMERIC, "C"); + old_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); val_2 = strtod (nptr, &fail_pos_2); setlocale (LC_NUMERIC, old_locale); + g_free (old_locale); } if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2) |