vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit d3cc189e0aeaf4669cedab9f2e1bf0be0ff4accd
parent 8edcae589295033f906c065b0afe9851411dfe46
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:
Msrc/9vx/osx/screen.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

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;