ncurses.c
changeset 114 6f6850407ccf
parent 77 49e0babccb23
child 115 47731bdd72c9
--- a/ncurses.c
+++ b/ncurses.c
@@ -38,7 +38,7 @@
 {
     wchar_t guess;
 
-    char dest[4];
+    char dest[6];
 
     int maxx;
     int maxy;
@@ -53,10 +53,7 @@
         maxx = getmaxx (win);
         maxy = getmaxy (win);
 
-        dest[0] = 0;
-        dest[1] = 0;
-        dest[2] = 0;
-        dest[3] = 0;
+        memset (&dest, 0, sizeof (dest));
         if (wctomb (dest, guess) == -1) {
             perror ("WCTOMB");
             return -1;