9vx/OSX: Proper error handling for unicode input. - vx32 - Local 9vx git repository for patches.
 (HTM) git clone git://r-36.net/vx32
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit d3cc189e0aeaf4669cedab9f2e1bf0be0ff4accd
 (DIR) parent 8edcae589295033f906c065b0afe9851411dfe46
 (HTM) Author: Andrey Mirtchovski <andrey@glendy.cpsc.ucalgary.ca>
       Date:   Thu,  3 Jul 2008 11:32:51 -0600
       
       9vx/OSX: Proper error handling for unicode input.
       
       Diffstat:
         M src/9vx/osx/screen.c                |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/9vx/osx/screen.c b/src/9vx/osx/screen.c
       @@ -412,9 +412,11 @@ kbdevent(EventRef event)
                                latin1putc(k, kputc);
                        else{
                                UniChar uc;
       -                        GetEventParameter(event, kEventParamKeyUnicodes,
       +                        OSStatus s;
       +                        
       +                        s = GetEventParameter(event, kEventParamKeyUnicodes,
                                        typeUnicodeText, nil, sizeof uc, nil, &uc);
       -                        if(uc >= 0)
       +                        if(s == noErr)
                                        kputc(uc);
                        }
                        break;