From 7304c8f5286af5dae3d81a3a927e42a8bfdb1b37 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Thu, 1 Dec 2011 17:27:00 +0100 Subject: [PATCH] Fixed uninitialized memory bug in the keyboard driver. This often prevented the letter 'c' from working in x64. --- sortix/keyboard.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sortix/keyboard.cpp b/sortix/keyboard.cpp index 2e3dc39e..98ad2094 100644 --- a/sortix/keyboard.cpp +++ b/sortix/keyboard.cpp @@ -575,10 +575,17 @@ namespace Sortix uint32_t** Layout = US::Layout; - nat Mask = 0; - nat LockMask = 0; + nat Mask; + nat LockMask; bool control; + void Init() + { + Mask = 0; + LockMask = 0; + control = false; + } + const nat Shift = (1<<0); const nat AltGr = (1<<1); const nat ScrLck = (1<<2); @@ -642,6 +649,8 @@ namespace Sortix // Initialize variables. LEDs = 0; + Layouts::Init(); + // Register our keystroke callback. Interrupt::RegisterHandler(Interrupt::IRQ1, OnIRQ1);