File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
ext_mod/lcd_bus/esp32_src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 344344 y_end = MIN (y_end , d_height );
345345 }
346346
347- uint16_t src_bytes_per_line = (x_end - x_start + 1 ) * (uint16_t )bytes_per_pixel ;
347+ uint16_t src_bytes_per_line = (x_end - x_start ) * (uint16_t )bytes_per_pixel ;
348348 uint32_t dst_bytes_per_line = bytes_per_pixel * d_width ;
349349 size_t offset = y_start * src_bytes_per_line + x_start * bytes_per_pixel ;
350350
361361 if (x_start == 0 && x_end == (d_width - 1 )) {
362362 memcpy (fb , src , d_width * (y_end - y_start + 1 ) * bytes_per_pixel );
363363 } else {
364+ src_bytes_per_line = (x_end - x_start + 1 ) * (uint16_t )bytes_per_pixel ;
365+
364366 for (int y = y_start ; y < y_end ; y ++ ) {
365367 memcpy (fb , src , src_bytes_per_line );
366368 fb += dst_bytes_per_line ;
You can’t perform that action at this time.
0 commit comments