Commit Diff


commit - cdead40b9bb4b40469d3aa3c31ec30904113114f
commit + 5a764c33f599e792674b5f4c01b4c0e51da262b7
blob - 5a7e9ea97732727b2833f902bb989ced2e5d8aec
blob + e8897c1d372664c07d1c76e70d9ac549333054c0
--- src/cmd/devdraw/osx-screen.c
+++ 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;