From 282bb3de3329bda13e7e557e8bbddef382c624de Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 6 Mar 2011 16:55:13 +0000 Subject: [PATCH] QT: Prevent assigning a negative value to a Word, cought by range-check. Sould fix issue #18876. git-svn-id: trunk@29735 - --- lcl/interfaces/qt/qtwidgets.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 4c85e636fa..ac2b4b6127 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -4008,7 +4008,7 @@ begin QtKey_Flip, QtKey_unknown: Result := VK_UNKNOWN; else - if AKey <= $FF then // Qt:AKey = VK_KEY in many cases + if AKey in [0..255] then // Qt:AKey = VK_KEY in many cases Result := AKey else if AText <> '' then