Fixed error when trying to read keyboard when there are no chars ready
This commit is contained in:
parent
1b093acfe6
commit
a729949d4c
10
src/main.cpp
10
src/main.cpp
|
@ -489,9 +489,13 @@ class Emulator {
|
|||
|
||||
// Input
|
||||
case 0x1E: {
|
||||
uint8_t c = e->input.front();
|
||||
e->input.pop();
|
||||
return c;
|
||||
if (e->input.size()) {
|
||||
uint8_t c = e->input.front();
|
||||
e->input.pop();
|
||||
return c;
|
||||
} else {
|
||||
return 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
// Has input
|
||||
|
|
Loading…
Reference in New Issue
Block a user