Fix hires cockpit image display (#271) (#272)

Strip map height is a 16 bit value. Cast to `br_uint_16 *`, so that the
upper 8 bits don't get lost.

This fixes cockpit image rendering for -hires mode, where said images
have heights exceeding 255px.
This commit is contained in:
Artur Rojek 2022-12-16 07:48:01 +01:00 committed by GitHub
parent 578a976ae8
commit 716b98c25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -842,7 +842,7 @@ tS8* ConvertPixToStripMap(br_pixelmap* pThe_br_map) {
temp_strip_image = BrMemAllocate(pThe_br_map->row_bytes * pThe_br_map->height, kMem_strip_image);
current_size = 2;
*temp_strip_image = pThe_br_map->height;
*(br_uint_16 *)temp_strip_image = pThe_br_map->height;
current_strip_pointer = temp_strip_image;
for (i = 0; i < pThe_br_map->height; i++) {