From: Pierre Ossman Date: Thu, 10 Mar 2011 11:57:03 +0000 (+0000) Subject: Off-by-one error. FL_F points to "F0", not F1. X-Git-Tag: v1.1.90~402 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=70f32469fbf2310a8321e90ff270c84cd1720680;p=tigervnc.git Off-by-one error. FL_F points to "F0", not F1. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4357 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 0188f724..a621e405 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -281,8 +281,8 @@ rdr::U32 DesktopWindow::translateKeyEvent(int keyCode, const char *keyText) unsigned ucs; // First check for function keys - if ((keyCode >= FL_F) && (keyCode <= FL_F_Last)) - return XK_F1 + (keyCode - FL_F); + if ((keyCode > FL_F) && (keyCode <= FL_F_Last)) + return XK_F1 + (keyCode - FL_F - 1); // Numpad numbers if ((keyCode >= (FL_KP + '0')) && (keyCode <= (FL_KP + '9')))