gcompris r3631 - in branches/GCOMPRIS_8_3: . src/boards



Author: bcoudoin
Date: Tue Nov 25 00:26:34 2008
New Revision: 3631
URL: http://svn.gnome.org/viewvc/gcompris?rev=3631&view=rev

Log:
	* src/boards/shapegame.c: (item_event_drag): Fixed a crash in case of multiple sound list.
	  This was especially the case in the level 3 of the double entry activity.
          Merged from trunk Commit r3628


Modified:
   branches/GCOMPRIS_8_3/   (props changed)
   branches/GCOMPRIS_8_3/ChangeLog
   branches/GCOMPRIS_8_3/configure.in
   branches/GCOMPRIS_8_3/src/boards/shapegame.c

Modified: branches/GCOMPRIS_8_3/configure.in
==============================================================================
--- branches/GCOMPRIS_8_3/configure.in	(original)
+++ branches/GCOMPRIS_8_3/configure.in	Tue Nov 25 00:26:34 2008
@@ -2,7 +2,7 @@
 
 AC_INIT(src/gcompris/gcompris.c)
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(gcompris, 8.3.9)
+AM_INIT_AUTOMAKE(gcompris, 8.3.10)
 AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 

Modified: branches/GCOMPRIS_8_3/src/boards/shapegame.c
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/shapegame.c	(original)
+++ branches/GCOMPRIS_8_3/src/boards/shapegame.c	Tue Nov 25 00:26:34 2008
@@ -944,16 +944,20 @@
                          * of sound rather than a single one */
                         char *p = NULL;
                         char *soundfile = g_strdup(shape->soundfile);
+			char *soundfiles = soundfile;
 
-                        while ((p = strstr (soundfile, " ")))
+                        while ((p = strstr (soundfiles, " ")))
                         {
                             *p='\0';
-                            gc_sound_play_ogg(soundfile, NULL);
-                            soundfile=p+1;
-                            g_warning("soundfile = %s\n", soundfile);
+                            gc_sound_play_ogg(soundfiles, NULL);
+                            soundfiles= p + 1;
+                            g_warning("soundfile = %s\n", soundfiles);
                         }
 
-                        gc_sound_play_ogg(soundfile, NULL);
+			if (soundfiles != soundfile)
+			  gc_sound_play_ogg(soundfiles, NULL);
+			else
+			  gc_sound_play_ogg(soundfile, NULL);
                     }
 		    else
 		      gc_sound_play_ogg ("sounds/bleep.wav", NULL);



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