Fixed overflow on windows

This commit is contained in:
Daniel Collin 2015-12-09 13:04:33 +01:00
parent e89cb04189
commit b46868121e

View file

@ -284,13 +284,13 @@ impl Window {
} }
pub fn get_keys(&self) -> Vec<Key> { pub fn get_keys(&self) -> Vec<Key> {
let mut index: u8 = 0; let mut index: u16 = 0;
let mut keys: Vec<Key> = Vec::new(); let mut keys: Vec<Key> = Vec::new();
for i in self.keys.iter() { for i in self.keys.iter() {
if *i { if *i {
unsafe { unsafe {
keys.push(mem::transmute(index)); keys.push(mem::transmute(index as u8));
} }
} }