Day 38: After 6 days, I have problems that I can't understand at all
Posted on by Rust on Julia Evans
tl;dr: I expect NUMS[2] to equal NUMS[keycode] when keycode == 2. This doesn’t appear to be the case, and I don’t understand how this is possible. I’m trying to set up keycode handling in my kernel, and I’m having a strange problem with array indexing that I can’t really fathom at all (except “something is wrong”). When I run this code, and press 1 several times, it prints |2C |2C |2C |2C |2C |2C |2C |2C |2C.