Skip to content
Permalink
Browse files

KeyToText bug

  • Loading branch information...
skirda1008 committed Jan 26, 2015
1 parent d8520fd commit 5c0474af3060192091247de5a9e2b38e279815b9
Showing with 22 additions and 2 deletions.
  1. +6 −1 far/changelog
  2. +3 −0 far/keyboard.cpp
  3. +12 −0 far/syslog.cpp
  4. +1 −1 far/vbuild.m4
@@ -1,4 +1,9 @@
drkns 24.01.2015 09:09:05 +0200 - build 4255
svs 26.01.2015 15:43:08 +0300 - build 4256

1. Падение дебажного FAR при вызове "__FARKEY_ToName(-1)".
В KeyToTextImpl() "KeyText[0]=(wchar_t)(Key&0xFFFF);" приводило к невалидному символу...

drkns 24.01.2015 09:09:05 +0200 - build 4255

1. Уточнение 4254.2.

@@ -1721,6 +1721,9 @@ bool KeyToTextImpl(int Key0, string& strKeyText, tfkey_to_text ToText, add_separ
{
strKeyText.clear();

if (Key0 == -1)
return false;

DWORD Key=(DWORD)Key0, FKey=(DWORD)Key0&0xFFFFFF;

GetShiftKeyName(strKeyText, Key, ToText, AddSeparator);
@@ -1307,6 +1307,9 @@ string __MCODE_ToName(DWORD OpCode)
string __FARKEY_ToName(int Key)
{
#if defined(SYSLOG)
if (!IsLogON())
return L"";

string Name;
if (!(Key >= KEY_MACRO_BASE && Key <= KEY_MACRO_ENDBASE) && KeyToText(Key,Name))
{
@@ -1523,6 +1526,9 @@ string __DLGMSG_ToName(DWORD Msg)
string __VK_KEY_ToName(int VkKey)
{
#if defined(SYSLOG)
if (!IsLogON())
return L"";

#define DEF_VK(k) { VK_##k , L#k }
__XXX_Name VK[]=
{
@@ -1617,6 +1623,9 @@ string __VK_KEY_ToName(int VkKey)
string __MOUSE_EVENT_RECORD_Dump(const MOUSE_EVENT_RECORD *rec)
{
#if defined(SYSLOG)
if (!IsLogON())
return L"";

string Records = str_printf(
L"MOUSE_EVENT_RECORD: [%d,%d], Btn=0x%08X (%c%c%c%c%c), Ctrl=0x%08X (%c%c%c%c%c - %c%c%c%c), Flgs=0x%08X (%s)",
rec->dwMousePosition.X,
@@ -1659,6 +1668,9 @@ string __MOUSE_EVENT_RECORD_Dump(const MOUSE_EVENT_RECORD *rec)
string __INPUT_RECORD_Dump(const INPUT_RECORD *rec)
{
#if defined(SYSLOG)
if (!IsLogON())
return L"";

string Records;

if (!rec)
@@ -1 +1 @@
m4_define(BUILD,4255)m4_dnl
m4_define(BUILD,4256)m4_dnl

0 comments on commit 5c0474a

Please sign in to comment.
You can’t perform that action at this time.