aboutsummaryrefslogtreecommitdiff
path: root/include/06.keyboard
diff options
context:
space:
mode:
authorAleksa Vučković <aleksav013@gmail.com>2022-03-06 12:55:49 +0100
committerAleksa Vučković <aleksav013@gmail.com>2022-03-06 12:55:49 +0100
commit598d1c86a5952d3e5d1d2175fdff3f76918a3ce9 (patch)
tree339798884e00d7dd6208911290c0ffb3d5fb344f /include/06.keyboard
parent03035c98b4ba3297b837e96080e78e0aac1e86db (diff)
font size change
Diffstat (limited to 'include/06.keyboard')
-rw-r--r--include/06.keyboard/keyboard.c7
-rw-r--r--include/06.keyboard/keyboard17.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/include/06.keyboard/keyboard.c b/include/06.keyboard/keyboard.c
index a95d399..ab31315 100644
--- a/include/06.keyboard/keyboard.c
+++ b/include/06.keyboard/keyboard.c
@@ -150,8 +150,11 @@ void keyboard_handler()
{
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;
}
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;
}