[Tux4kids-commits] r181 - tuxtype/trunk/tuxtype

dbruce-guest at alioth.debian.org dbruce-guest at alioth.debian.org
Mon May 14 11:17:16 UTC 2007


Author: dbruce-guest
Date: 2007-05-14 11:17:16 +0000 (Mon, 14 May 2007)
New Revision: 181

Modified:
   tuxtype/trunk/tuxtype/alphabet.c
Log:
minor fix in WORDS_use() in alphabet.c


Modified: tuxtype/trunk/tuxtype/alphabet.c
===================================================================
--- tuxtype/trunk/tuxtype/alphabet.c	2007-05-11 11:16:16 UTC (rev 180)
+++ tuxtype/trunk/tuxtype/alphabet.c	2007-05-14 11:17:16 UTC (rev 181)
@@ -455,7 +455,9 @@
       continue;
 
     /* If we make it to here, OK to add word: */
-    mbstowcs(WORDS[WORD_qty], temp_word, strlen(temp_word));
+    /* NOTE we have to add one to the length argument to get */
+    /* mbstowcs() to reliably include the terminating null.  */
+    mbstowcs(WORDS[WORD_qty], temp_word, strlen(temp_word) + 1);
     WORD_qty++;
   }
         




More information about the Tux4kids-commits mailing list