From 12aebe1fa1d9292085adb21604baf4a5d77e3953 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Thu, 11 Apr 2013 00:49:02 +0200 Subject: Added comments. --- atari/misc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'atari') diff --git a/atari/misc.c b/atari/misc.c index 1b4c3eaf4..e8e6a9bb0 100755 --- a/atari/misc.c +++ b/atari/misc.c @@ -334,10 +334,14 @@ void gem_set_cursor( MFORM_EX * cursor ) long nkc_to_input_key(short nkc, long * ucs4_out) { unsigned char ascii = (nkc & 0xFF); - nkc = (nkc & (NKF_CTRL|NKF_SHIFT|0xFF)); long ik = 0; + + // initialize result: *ucs4_out = 0; + // sanitize input key: + nkc = (nkc & (NKF_CTRL|NKF_SHIFT|0xFF)); + /* shift + cntrl key: */ if( ((nkc & NKF_CTRL) == NKF_CTRL) && ((nkc & (NKF_SHIFT))!=0) ) { -- cgit v1.2.3