]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Third parameter of GetLocaleInfo is LPTSTR. Also compute the 4th
authorAdam Tkac <atkac@redhat.com>
Thu, 24 Jun 2010 20:08:14 +0000 (20:08 +0000)
committerAdam Tkac <atkac@redhat.com>
Thu, 24 Jun 2010 20:08:14 +0000 (20:08 +0000)
parameter more precisely.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4071 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/rfb_win32/CKeyboard.cxx

index ee5b85eb44932fd44e54e442ba7962a98a38bddc..408e483af7de88435bd55b18daac3d037e24da6a 100644 (file)
@@ -64,7 +64,8 @@ public:
     // be a comma and a DECIMAL to be a dot. 
     if (extendedVkey == VK_DECIMAL || extendedVkey == VK_SEPARATOR) {
       char buf[4];
-      if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) buf, sizeof(buf))) {
+      if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPTSTR) buf,
+                        sizeof(buf) / sizeof(TCHAR))) {
        vlog.debug("failed to retrieve LOCALE_SDECIMAL");
       } else {
        switch (buf[0]) {