summaryrefslogtreecommitdiff
path: root/src/w32inevt.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2010-01-28 00:22:16 +0800
committerJason Rumney <jasonr@gnu.org>2010-01-28 00:22:16 +0800
commitdd5de7c6e4efc3c49e01ce75313303ba78e31b94 (patch)
treec03590e6af244a808df9efaa0efac1375b4c25b5 /src/w32inevt.c
parent7e23373040046d7dd1cfe7dd77c78a0ac1075028 (diff)
Fix typos, check for negative ASCII characters.
Diffstat (limited to 'src/w32inevt.c')
-rw-r--r--src/w32inevt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c
index ebdff1357a..159751c8b4 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -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;