[ion] Blackbox ignores undefined events

Change-Id: Iab18d5a66d4c872ec94c918442660203cdc9c8ed
This commit is contained in:
Romain Goyet
2017-05-01 18:41:56 +02:00
parent cc31953d88
commit c1e01cffe5

View File

@@ -11,7 +11,7 @@ static int sEventCount = 0;
Ion::Events::Event Ion::Events::getEvent(int * timeout) {
Ion::Events::Event event = Ion::Events::None;
while (!event.isKeyboardEvent()) {
while (!(event.isDefined() && event.isKeyboardEvent())) {
int c = getchar();
if (c == EOF) {
printf("Finished processing %d events\n", sEventCount);