diff options
Diffstat (limited to 'include/06.keyboard/keyboard17.c')
| -rw-r--r-- | include/06.keyboard/keyboard17.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/06.keyboard/keyboard17.c b/include/06.keyboard/keyboard17.c index 359ba30..171088f 100644 --- a/include/06.keyboard/keyboard17.c +++ b/include/06.keyboard/keyboard17.c @@ -15,8 +15,11 @@ { c=shift_charcode[keycode]; } - buffer[buffer_current][buffer_index++]=c; - printf("%c",c); + if(buffer_index<BUFFER_SIZE) + { + buffer[buffer_current][buffer_index++]=c; + printf("%c",c); + } } break; } |
