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:
parent
19198ea665
commit
ee8d853fcb
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user