Mercurial > emacs
changeset 107016:b7aa72d41625
Fix typos, check for negative ASCII characters.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 28 Jan 2010 00:22:16 +0800 |
parents | 0b67a7f89499 |
children | 6e5747b7cfa2 |
files | src/w32inevt.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32inevt.c Wed Jan 27 21:59:13 2010 +0800 +++ b/src/w32inevt.c Thu Jan 28 00:22:16 2010 +0800 @@ -470,7 +470,7 @@ 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 @@ /* 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 @@ { /* 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;