ncurses.c
changeset 114 6f6850407ccf
parent 77 49e0babccb23
child 115 47731bdd72c9
equal deleted inserted replaced
113:397270b5d21a 114:6f6850407ccf
    36 
    36 
    37 wchar_t func (WINDOW * win)
    37 wchar_t func (WINDOW * win)
    38 {
    38 {
    39     wchar_t guess;
    39     wchar_t guess;
    40 
    40 
    41     char dest[4];
    41     char dest[6];
    42 
    42 
    43     int maxx;
    43     int maxx;
    44     int maxy;
    44     int maxy;
    45 
    45 
    46     while (guess != ESCAPE) {
    46     while (guess != ESCAPE) {
    51             ;
    51             ;
    52 
    52 
    53         maxx = getmaxx (win);
    53         maxx = getmaxx (win);
    54         maxy = getmaxy (win);
    54         maxy = getmaxy (win);
    55 
    55 
    56         dest[0] = 0;
    56         memset (&dest, 0, sizeof (dest));
    57         dest[1] = 0;
       
    58         dest[2] = 0;
       
    59         dest[3] = 0;
       
    60         if (wctomb (dest, guess) == -1) {
    57         if (wctomb (dest, guess) == -1) {
    61             perror ("WCTOMB");
    58             perror ("WCTOMB");
    62             return -1;
    59             return -1;
    63         }
    60         }
    64 
    61