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:
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;