# HG changeset patch # User Jason Rumney # Date 1264609336 -28800 # Node ID b7aa72d41625f7efecadda964b875e73dac8fa76 # Parent 0b67a7f89499d3c74f302060c6fadfac340aef2a Fix typos, check for negative ASCII characters. diff -r 0b67a7f89499 -r b7aa72d41625 src/w32inevt.c --- 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;