GNOME 981009, highscore bugfix




Hi,

when playing games from gnome-games package, the games will segfault
if you make it into already populated high score list.
gnome-libs/libgnome/gnome-score.c, gnome_score_log() reads the rank from
stdout and g_message() seems to write to stdout, if syslogd is not
set up to collect g_message() output. This leads to garbled rank value
and it leads to segfault in gnome-libs/libgnomeui/gnome-scores.c,
gnome_scores_set_current_player().

Is there a reason to communicate via stdin/stdout instead of any other
file handle?

Anyway, here is a workaround.
------------------------------------
--- gnome-libs/libgnome/gnome-score.c-dist	Wed Sep  9 22:23:25 1998
+++ gnome-libs/libgnome/gnome-score.c	Fri Oct  9 18:16:28 1998
@@ -111,8 +111,10 @@
 	     if(sscanf(buf, "%f %ld %s", &ascore, &atime, name) != 3)
 	       break;
 
+	     /*
 	     g_message("Got score %f time %ld name %s",
 		       ascore, atime, name);
+	     */
 
 	     anitem = g_new(struct ascore_t, 1);
 	     anitem->score = ascore;
------------------------------------

-- 
Kang-Jin Lee
lee@arco.met.fu-berlin.de



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]