[monkey-bubble: 110/753] Applied patch from Dennis Bjorklund <dennisb cs chalmers se> to fix
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 110/753] Applied patch from Dennis Bjorklund <dennisb cs chalmers se> to fix
- Date: Wed, 14 Jul 2010 22:04:55 +0000 (UTC)
commit 3db665b0d068006534dcc7ace105dddb877836b8
Author: George Lebl <jirka 5z com>
Date: Fri May 26 19:29:32 2000 +0000
Applied patch from Dennis Bjorklund <dennisb cs chalmers se> to fix
Fri May 26 12:24:02 2000 George Lebl <jirka 5z com>
* gnome-score.c: Applied patch from Dennis Bjorklund
<dennisb cs chalmers se> to fix another unprotected atof with
setting locale to "C" and then back.
libgnome/gnome-score.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libgnome/gnome-score.c b/libgnome/gnome-score.c
index 11fd974..23b941c 100644
--- a/libgnome/gnome-score.c
+++ b/libgnome/gnome-score.c
@@ -417,6 +417,8 @@ gnome_score_get_notable (gchar * gamename,
if (infile)
{
+ char *old_locale = setlocale (LC_NUMERIC, "C");
+
*names = g_malloc ((NSCORES + 1) * sizeof (gchar *));
*scores = g_malloc ((NSCORES + 1) * sizeof (gfloat));
*scoretimes = g_malloc ((NSCORES + 1) * sizeof (time_t));
@@ -437,6 +439,8 @@ gnome_score_get_notable (gchar * gamename,
}
(*names)[retval] = NULL;
(*scores)[retval] = 0.0;
+
+ setlocale (LC_NUMERIC, old_locale);
fclose (infile);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]