Fixed error when trying to read keyboard when there are no chars ready

This commit is contained in:
Dreaded_X 2021-02-01 00:58:00 +01:00
parent 1b093acfe6
commit a729949d4c

View File

@ -489,9 +489,13 @@ class Emulator {
// Input // Input
case 0x1E: { case 0x1E: {
if (e->input.size()) {
uint8_t c = e->input.front(); uint8_t c = e->input.front();
e->input.pop(); e->input.pop();
return c; return c;
} else {
return 0x00;
}
} }
// Has input // Has input