File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,20 @@ namespace user_interface_base {
148148 return res
149149 }
150150
151- // Simply get the row, slice off the required bytes:
151+ // Buffer lies on a single row:
152+ // Simply get the row then slice off the required bytes.
152153 else {
153154 const rowBuf = Buffer . create ( bitmap . width ) ;
155+ bitmap . getRows ( startingRow , rowBuf ) ;
154156 let res = Buffer . create ( chunkSize ) ;
155157
156158 // bitmap.getRows(startingRow, rowBuf);
157159 // basic.showNumber(rowBuf.length)
158160 // const res = rowBuf.slice(startIndex % width, chunkSize);
159161 const start = startIndex % width ;
160- const end = start + chunkSize ;
162+ // const end = start + chunkSize;
161163 for ( let i = 0 ; i < chunkSize ; i ++ ) {
162- res [ i ] = rowBuf [ i + startIndex ] ;
164+ res [ i ] = rowBuf [ i + start ] ;
163165 }
164166 return res
165167 }
You can’t perform that action at this time.
0 commit comments