Closed krypt-n closed 8 years ago
Just turn the int
into a unsigned int
so it'll handle the range [0..5] just fine, wasting memory is a crime.
Oh, I just noticed that on 32-Bit machines, version 1 and 3 are 4 byte smaller than version 2. I guess I will make the change you proposed, since you are so fond of bitfields and saving memory.
Fix LemonBoy/bar#154 and krypt-n/bar#18
Problem was that an int:3 has a range of -4 to 3, buttons 4 and 5 did not fit into it. Why do we need to try to save memory by using bitfields here?