Fix typos, check for negative ASCII characters.
This commit is contained in:
parent
7e23373040
commit
dd5de7c6e4
1 changed files with 4 additions and 4 deletions
|
@ -470,7 +470,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
|
|||
emacs_ev->kind = NO_EVENT;
|
||||
return 0;
|
||||
}
|
||||
else if (event->uChar.AsciiChar < 128)
|
||||
else if (event->uChar.AsciiChar > 0 && event->uChar.AsciiChar < 128)
|
||||
{
|
||||
emacs_ev->kind = ASCII_KEYSTROKE_EVENT;
|
||||
emacs_ev->code = event->uChar.AsciiChar;
|
||||
|
@ -503,13 +503,13 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
|
|||
/* Garbage */
|
||||
DebPrint (("Invalid DBCS sequence: %d %d\n",
|
||||
dbcs[0], dbcs[1]));
|
||||
emacs_ev.kind = NO_EVENT;
|
||||
emacs_ev->kind = NO_EVENT;
|
||||
}
|
||||
}
|
||||
else if (IsDBCSLeadByteEx (cpId, dbcs[1]))
|
||||
{
|
||||
dbcs_lead = dbcs[1];
|
||||
emacs_ev.kind = NO_EVENT;
|
||||
emacs_ev->kind = NO_EVENT;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -517,7 +517,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
|
|||
{
|
||||
/* Garbage */
|
||||
DebPrint (("Invalid character: %d\n", dbcs[1]));
|
||||
emacs_ev.kind = NO_EVENT;
|
||||
emacs_ev->kind = NO_EVENT;
|
||||
}
|
||||
}
|
||||
emacs_ev->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
|
||||
|
|
Loading…
Add table
Reference in a new issue