aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2008-07-03 13:43:58 -0400
committerRuss Cox <rsc@swtch.com>2008-07-03 13:43:58 -0400
commit5a764c33f599e792674b5f4c01b4c0e51da262b7 (patch)
treef4cf87182bc6e49257d1eaa2d111db7cc73186b6 /src
parentcdead40b9bb4b40469d3aa3c31ec30904113114f (diff)
downloadplan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.tar.gz
plan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.tar.bz2
plan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.zip
devdraw: OS X: fix Unicode input errors (Andrey Mirtchovski)
Diffstat (limited to 'src')
-rw-r--r--src/cmd/devdraw/osx-screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/devdraw/osx-screen.c b/src/cmd/devdraw/osx-screen.c
index 5a7e9ea9..e8897c1d 100644
--- a/src/cmd/devdraw/osx-screen.c
+++ b/src/cmd/devdraw/osx-screen.c
@@ -426,9 +426,11 @@ kbdevent(EventRef event)
keystroke(k);
else{
UniChar ch;
- GetEventParameter(event, kEventParamKeyUnicodes,
+ OSStatus s;
+
+ s = GetEventParameter(event, kEventParamKeyUnicodes,
typeUnicodeText, nil, sizeof uc, nil, &uc);
- if(uc >= 0)
+ if(s == noErr)
keystroke(uc);
}
break;