Skip to content

Commit a45cd2a

Browse files
committed
hosted: fix wasteful drawing routine
O(n^2) -> O(n)
1 parent 9dd8cbf commit a45cd2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hosted/Arduino.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void hosted_pump_events() {
218218

219219
if (new_line > last_line) {
220220
// draw picture lines
221-
for (int i = last_line; i < vs23.height(); ++i) {
221+
for (int i = last_line; i < _min(new_line,vs23.height()); ++i) {
222222
#define m_current_mode vs23.m_current_mode // needed by STARTLINE...
223223
#define m_pal vs23_int.pal
224224

0 commit comments

Comments
 (0)