1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Ensures you can't get a phase 2 for free with run_for(0).

This commit is contained in:
Thomas Harte 2019-07-17 14:20:27 -04:00
parent 19198ea665
commit ee8d853fcb

View File

@ -347,6 +347,7 @@ template <typename T> void MOS6522<T>::do_phase1() {
/*! Runs for a specified number of half cycles. */
template <typename T> void MOS6522<T>::run_for(const HalfCycles half_cycles) {
int number_of_half_cycles = half_cycles.as_int();
if(!number_of_half_cycles) return;
if(is_phase2_) {
do_phase2();