Skip to content

Commit 2ad99d9

Browse files
committed
screen.ts getBuffer: trying without getRow
1 parent be487c4 commit 2ad99d9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

screen.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,13 @@ namespace user_interface_base {
154154

155155
// bitmap.getRows(startingRow, rowBuf);
156156
// basic.showNumber(rowBuf.length)
157-
158-
const res = rowBuf.slice(startIndex % width, chunkSize);
159-
for (let i = 0; i < res.length; i++) {
160-
res[i] = 3;
157+
// const res = rowBuf.slice(startIndex % width, chunkSize);
158+
const start = startIndex % width;
159+
const end = start + chunkSize;
160+
for (let i = start; i < end; i++) {
161+
rowBuf[i] = 3;
161162
}
162-
return res
163+
return rowBuf
163164
}
164165
}
165166

0 commit comments

Comments
 (0)