diff options
| author | Jason Rumney | 2010-01-28 00:22:16 +0800 |
|---|---|---|
| committer | Jason Rumney | 2010-01-28 00:22:16 +0800 |
| commit | dd5de7c6e4efc3c49e01ce75313303ba78e31b94 (patch) | |
| tree | c03590e6af244a808df9efaa0efac1375b4c25b5 /src | |
| parent | 7e23373040046d7dd1cfe7dd77c78a0ac1075028 (diff) | |
| download | emacs-dd5de7c6e4efc3c49e01ce75313303ba78e31b94.tar.gz emacs-dd5de7c6e4efc3c49e01ce75313303ba78e31b94.zip | |
Fix typos, check for negative ASCII characters.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32inevt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c index ebdff1357a1..159751c8b46 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) | |||
| 470 | emacs_ev->kind = NO_EVENT; | 470 | emacs_ev->kind = NO_EVENT; |
| 471 | return 0; | 471 | return 0; |
| 472 | } | 472 | } |
| 473 | else if (event->uChar.AsciiChar < 128) | 473 | else if (event->uChar.AsciiChar > 0 && event->uChar.AsciiChar < 128) |
| 474 | { | 474 | { |
| 475 | emacs_ev->kind = ASCII_KEYSTROKE_EVENT; | 475 | emacs_ev->kind = ASCII_KEYSTROKE_EVENT; |
| 476 | emacs_ev->code = event->uChar.AsciiChar; | 476 | emacs_ev->code = event->uChar.AsciiChar; |
| @@ -503,13 +503,13 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) | |||
| 503 | /* Garbage */ | 503 | /* Garbage */ |
| 504 | DebPrint (("Invalid DBCS sequence: %d %d\n", | 504 | DebPrint (("Invalid DBCS sequence: %d %d\n", |
| 505 | dbcs[0], dbcs[1])); | 505 | dbcs[0], dbcs[1])); |
| 506 | emacs_ev.kind = NO_EVENT; | 506 | emacs_ev->kind = NO_EVENT; |
| 507 | } | 507 | } |
| 508 | } | 508 | } |
| 509 | else if (IsDBCSLeadByteEx (cpId, dbcs[1])) | 509 | else if (IsDBCSLeadByteEx (cpId, dbcs[1])) |
| 510 | { | 510 | { |
| 511 | dbcs_lead = dbcs[1]; | 511 | dbcs_lead = dbcs[1]; |
| 512 | emacs_ev.kind = NO_EVENT; | 512 | emacs_ev->kind = NO_EVENT; |
| 513 | } | 513 | } |
| 514 | else | 514 | else |
| 515 | { | 515 | { |
| @@ -517,7 +517,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead) | |||
| 517 | { | 517 | { |
| 518 | /* Garbage */ | 518 | /* Garbage */ |
| 519 | DebPrint (("Invalid character: %d\n", dbcs[1])); | 519 | DebPrint (("Invalid character: %d\n", dbcs[1])); |
| 520 | emacs_ev.kind = NO_EVENT; | 520 | emacs_ev->kind = NO_EVENT; |
| 521 | } | 521 | } |
| 522 | } | 522 | } |
| 523 | emacs_ev->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; | 523 | emacs_ev->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; |