mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-10 22:37:30 +00:00
Avoid potential out-of-bounds access.
This commit is contained in:
parent
15da707324
commit
b654c2e170
@ -99,7 +99,7 @@ void Bus::run_for(HalfCycles time) {
|
||||
|
||||
const auto old_index = dispatch_index_;
|
||||
const auto time_as_int = time_in_state_.as_integral();
|
||||
while(time_as_int >= dispatch_times_[dispatch_index_] && dispatch_index_ < dispatch_times_.size()) {
|
||||
while(dispatch_index_ < dispatch_times_.size() && time_as_int >= dispatch_times_[dispatch_index_]) {
|
||||
++dispatch_index_;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user