Whoops: The processor should only execute instructions while it is powered. Otherwise, it'll get into an infinite loop.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-08-31 17:19:32 +01:00
parent 711d4f4384
commit 406e651c66

View File

@ -19,9 +19,9 @@ void EightBit::Processor::initialise() {
int EightBit::Processor::run(int limit) {
int current = 0;
do {
while (powered() && current < limit) {
current += singleStep();
} while (current < limit);
}
return current;
}