at-spi r1130 - in trunk: . registryd



Author: liyuan
Date: Thu Nov 27 06:14:01 2008
New Revision: 1130
URL: http://svn.gnome.org/viewvc/at-spi?rev=1130&view=rev

Log:
2008-11-27  Li Yuan  <li yuan sun com>

        * registryd/deviceeventcontroller.c: (spi_key_set_contains_key),
        (dec_synth_keystring):
        Bug #540183. Patch from Mike Gorse. Add string length for the
        terminating null.


Modified:
   trunk/ChangeLog
   trunk/registryd/deviceeventcontroller.c

Modified: trunk/registryd/deviceeventcontroller.c
==============================================================================
--- trunk/registryd/deviceeventcontroller.c	(original)
+++ trunk/registryd/deviceeventcontroller.c	Thu Nov 27 06:14:01 2008
@@ -1359,7 +1359,9 @@
   
   if (len == 0) /* special case, means "all keys/any key" */
     {
-      g_print ("anykey\n");	    
+#ifdef SPI_DEBUG
+      g_print ("anykey\n");
+#endif
       return TRUE;
     }
 
@@ -2226,7 +2228,7 @@
 	gboolean retval = TRUE;
 	const gchar *c;
 
-	maxlen = strlen (keystring);
+	maxlen = strlen (keystring) + 1;
 	keysyms = g_new0 (KeySym, maxlen);
 	if (!(keystring && *keystring && g_utf8_validate (keystring, -1, &c))) { 
 		retval = FALSE;



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