mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
Use an array instead of an uninitialized wild pointer.
Using wild pointers is a dangerous practice, although you may not encounter errors now.
This commit is contained in:
parent
7aff64740e
commit
bd527d3572
@ -6,7 +6,7 @@
|
|||||||
static void keyboard_callback(registers_t regs) {
|
static void keyboard_callback(registers_t regs) {
|
||||||
/* The PIC leaves us the scancode in port 0x60 */
|
/* The PIC leaves us the scancode in port 0x60 */
|
||||||
u8 scancode = port_byte_in(0x60);
|
u8 scancode = port_byte_in(0x60);
|
||||||
char *sc_ascii;
|
char sc_ascii[4];
|
||||||
int_to_ascii(scancode, sc_ascii);
|
int_to_ascii(scancode, sc_ascii);
|
||||||
kprint("Keyboard scancode: ");
|
kprint("Keyboard scancode: ");
|
||||||
kprint(sc_ascii);
|
kprint(sc_ascii);
|
||||||
|
Loading…
Reference in New Issue
Block a user