Skip to content

Commit a1ae30a

Browse files
committed
screen.ts getBuffer debugging else branch
1 parent ec2de27 commit a1ae30a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

screen.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ namespace user_interface_base {
125125
public static getBuffer(bitmap: Bitmap, chunkIndex: number, chunkSize: number): Buffer {
126126
const width = bitmap.width
127127
const startIndex = chunkIndex * chunkSize;
128-
const startingRow = (startIndex / width | 0);
129-
130128
const endIndex = startIndex + chunkSize;
129+
130+
const startingRow = (startIndex / width | 0);
131131
const endingRow = (endIndex / width | 0);
132132

133133
// Buffer crosses multiple rows:
@@ -150,6 +150,7 @@ namespace user_interface_base {
150150

151151
// Simply get the row, slice off the required bytes:
152152
else {
153+
basic.showNumber(chunkIndex)
153154
const rowBuf = Buffer.create(bitmap.width);
154155
bitmap.getRows(startingRow, rowBuf);
155156
const res = rowBuf.slice(startIndex % width, chunkSize);

0 commit comments

Comments
 (0)