mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 19:31:30 +11:00
Fixed overflow on windows
This commit is contained in:
parent
e89cb04189
commit
b46868121e
|
@ -284,13 +284,13 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn get_keys(&self) -> Vec<Key> {
|
||||
let mut index: u8 = 0;
|
||||
let mut index: u16 = 0;
|
||||
let mut keys: Vec<Key> = Vec::new();
|
||||
|
||||
for i in self.keys.iter() {
|
||||
if *i {
|
||||
unsafe {
|
||||
keys.push(mem::transmute(index));
|
||||
keys.push(mem::transmute(index as u8));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue