Rob Shearman : dinput: Fix character count passed to GetKeyNameTextW in SysKeyboardWImpl_GetObjectInfo .

Alexandre Julliard julliard at winehq.org
Mon Feb 25 06:51:44 CST 2008


Module: wine
Branch: master
Commit: fe75a8c616e25c76620856842a4911df15f286da
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fe75a8c616e25c76620856842a4911df15f286da

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Feb 25 09:01:49 2008 +0000

dinput: Fix character count passed to GetKeyNameTextW in SysKeyboardWImpl_GetObjectInfo.

---

 dlls/dinput/keyboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index ef66ed9..82e50c3 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -361,7 +361,8 @@ static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface
 
     if (!GetKeyNameTextW((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 |
                          (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16,
-                         pdidoi->tszName, sizeof(pdidoi->tszName)))
+                         pdidoi->tszName,
+                         sizeof(pdidoi->tszName)/sizeof(pdidoi->tszName[0])))
         return DIERR_OBJECTNOTFOUND;
 
     _dump_OBJECTINSTANCEW(pdidoi);




More information about the wine-cvs mailing list